docs: added code blocks without headers (#2560)

This commit is contained in:
Shahed Nasser
2022-11-07 17:36:51 +02:00
committed by GitHub
parent bbf4039147
commit c0639ef708
35 changed files with 336 additions and 98 deletions

View File

@@ -7,7 +7,7 @@ In this document, you will learn how to make a container of Medusa's app on Dock
### Node.js
Medusa supports Node versions 14 and 16. You can check which version of Node you have by running the following command:
```bash
```bash noHeader
node -v
```
@@ -21,18 +21,18 @@ It is assumed that you have Docker installed on your system. You can install it
### 1. Clone Medusa's starter project from GitHub
```bash
```bash noHeader
git clone https://github.com/medusajs/medusa-starter-default.git my-medusa-starter
```
### 2. Change to the newly created project directory
```bash
```bash noHeader
cd my-medusa-starter
```
### 3. Rename the environment variables(.env) file
```bash
```bash noHeader
mv .env.template .env
```
@@ -40,7 +40,7 @@ mv .env.template .env
Make sure the Docker Desktop app is running. Then, run the following command:
```bash
```bash noHeader
docker-compose up --build
```
@@ -48,7 +48,7 @@ docker-compose up --build
If you get the error `ERROR: for postgres Cannot start service postgres: Ports are not available`, change the ports used for PostgreSQL in `docker-compose.yml` to something like this:
```yml
```yml noHeader
postgres:
ports:
- "5433:5433"
@@ -68,7 +68,7 @@ Once done, your server will be accessible at `http://localhost:9000`.
You can test out your server using tools like Postman or by sending a cURL request:
```bash
```bash noHeader
curl -X GET localhost:9000/store/products | python -m json.tool
```
@@ -76,7 +76,7 @@ curl -X GET localhost:9000/store/products | python -m json.tool
This command uses Python to format the result of the request better in your command line. If you don't want to use Python you can simply send a request without the formatting:
```bash
```bash noHeader
curl localhost:9000/store/products
```

View File

@@ -6,7 +6,7 @@ This document will guide you through setting up your Medusa server in a few minu
Medusa supports Node versions 14 and 16. You can check which version of Node you have by running the following command:
```bash
```bash noHeader
node -v
```
@@ -16,7 +16,7 @@ You can install Node from the [official website](https://nodejs.org/en/).
### 1. Install Medusa CLI
```bash npm2yarn
```bash npm2yarn noHeader
npm install @medusajs/medusa-cli -g
```
@@ -28,13 +28,13 @@ If you run into any errors while installing the CLI tool, check out the [trouble
### 2. Create a new Medusa project
```bash
```bash noHeader
medusa new my-medusa-store --seed
```
### 3. Start your Medusa server
```bash
```bash noHeader
cd my-medusa-store
medusa develop
```
@@ -43,7 +43,7 @@ If you run into any errors while installing the CLI tool, check out the [trouble
After these three steps and in only a couple of minutes, you now have a complete commerce engine running locally. You can test it out by sending a request using a tool like Postman or through the command line:
```bash
```bash noHeader
curl localhost:9000/store/products | python -m json.tool
```
@@ -51,7 +51,7 @@ curl localhost:9000/store/products | python -m json.tool
This command uses Python to format the result of the request better in your command line. If you don't want to use Python you can simply send a request without the formatting:
```bash
```bash noHeader
curl localhost:9000/store/products
```