docs: added a note about using Yarn for installation (#2778)

* docs: added a note about yarn being faster

* docs: fixed env variable used in admin deployment guide

* docs: fixed the use of noReport with npm2yarn
This commit is contained in:
Shahed Nasser
2022-12-13 11:52:55 +02:00
committed by GitHub
parent 6c796bf582
commit 7227c1539b
9 changed files with 37 additions and 9 deletions

View File

@@ -34,6 +34,12 @@ Instead of manually following this guide to install then later deploy the Medusa
## Install the Admin
:::tip
It is recommended to use [Yarn](https://yarnpkg.com/getting-started/install) for the installation process as it's much faster than using NPM.
:::
Start by cloning the [Admin GitHub repository](https://github.com/medusajs/admin) and changing to the cloned directory:
```bash
@@ -55,7 +61,7 @@ Before running your Medusa admin, make sure that your Medusa server is running.
To run your Medusa server, go to the directory holding the server and run:
```bash npm2yarn noReport
```bash npm2yarn
npm run start
```
@@ -77,7 +83,7 @@ Use your Medusa admins user credentials to log in.
If you installed the demo data when you installed the Medusa server by using the `--seed` option or running:
```bash npm2yarn noReport
```bash npm2yarn
npm run seed
```

View File

@@ -75,7 +75,7 @@ Be careful with your file names as it can cause unclear errors in Typeorm. Make
Before trying this step make sure that youve created and run your migrations. You also need to re-build your code using:
```bash npm2yarn noReport
```bash npm2yarn
npm run build
```

View File

@@ -54,7 +54,7 @@ In this section, you'll learn how to use services throughout your Medusa server.
Before using your service, make sure you run the `build` command:
```bash npm2yarn noReport
```bash npm2yarn
npm run build
```

View File

@@ -113,7 +113,7 @@ Next, click the “Show advanced” button, which is above the “Deploy site”
Under the “Advanced build settings” section click on the “New variable” button. This will show two inputs for the key and value of the environment variable.
For the first field enter the key `GATSBY_MEDUSA_BACKEND_URL` and for the value enter the URL of your Medusa server.
For the first field enter the key `MEDUSA_BACKEND_URL` and for the value enter the URL of your Medusa server.
:::caution
@@ -121,7 +121,11 @@ If you havent deployed your Medusa server yet, you can leave the value blank
:::
![Environment Variable](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001898/Medusa%20Docs/Netlify/DnutZfT_rv8iel.png)
:::note
In previous versions of the admin, the environment variable name was `GATSBY_MEDUSA_BACKEND_URL` or `GATSBY_STORE_URL` instead. The admin remains backwards compatible, so if you've used this an older version you can keep the same environment variables. However, it's highly recommended you change it to `MEDUSA_BACKEND_URL`.
:::
Once youre done, scroll down and click on Deploy site.

View File

@@ -14,9 +14,15 @@ You can install Node from the [official website](https://nodejs.org/en/).
## Create a Medusa Server
:::tip
It is recommended to use [Yarn](https://yarnpkg.com/getting-started/install) for the installation process as it's much faster than using NPM.
:::
### 1. Install Medusa CLI
```bash npm2yarn noReport
```bash npm2yarn
npm install @medusajs/medusa-cli -g
```

View File

@@ -24,6 +24,12 @@ npm install gatsby-cli -g
## Installation
:::tip
It is recommended to use [Yarn](https://yarnpkg.com/getting-started/install) for the installation process as it's much faster than using NPM.
:::
1\. Create a new Gatsby project using the [Medusa starter template](https://github.com/medusajs/gatsby-starter-medusa):
```bash

View File

@@ -18,6 +18,12 @@ This document assumes you already have a Medusa server installed. If you dont
## Installation
:::tip
It is recommended to use [Yarn](https://yarnpkg.com/getting-started/install) for the installation process as it's much faster than using NPM.
:::
1\. Create a new Next.js project using the [Medusa starter template](https://github.com/medusajs/nextjs-starter-medusa):
```bash

View File

@@ -46,7 +46,7 @@ medusa migrations run
If you want to add demo data into your server, you should also seed the database using the following command:
```bash npm2yarn noReport
```bash npm2yarn
npm run seed
```

View File

@@ -123,7 +123,7 @@ The final installation required to get started with Medusa is the Medusa CLI. It
You can install Medusas CLI with the following command:
```bash npm2yarn noReport
```bash npm2yarn
npm install @medusajs/medusa-cli -g
```