diff --git a/docs/docs/guides/getting-started/installation/index.md b/docs/docs/guides/getting-started/installation/index.md index 3782700d8f..3b8c1c2576 100644 --- a/docs/docs/guides/getting-started/installation/index.md +++ b/docs/docs/guides/getting-started/installation/index.md @@ -8,22 +8,46 @@ import TabItem from '@theme/TabItem'; ## Requirements -* [Node.js](https://nodejs.org/en/) **v18** or above, with support for **even-numbered Node.js versions**. -* The [supported TypeScript version](https://github.com/vendure-ecommerce/vendure/blob/master/packages/create/src/constants.ts#L7) is set upon installation. Upgrading to a newer version of TypeScript might result in compilation errors. -* If you want to use MySQL, MariaDB, or Postgres as your data store, then you'll need an instance available locally. However, **if you are just testing out Vendure, we recommend using SQLite**, which has no external requirements. -* If you use **Yarn**, from Vendure v2.2.0+, you'll need to use **Yarn 2** (Berry) or above. +* [Node.js](https://nodejs.org/en/) **v18** or above, with support for **even-numbered Node.js versions**. (Odd-numbered versions should still work but are not officially supported.) + +### Optional +* [Docker Desktop](https://www.docker.com/products/docker-desktop/): If you want to use the quick start with Postgres, you must have Docker Desktop installed. If you do not have Docker Desktop installed + then SQLite will be used for your database. +* If you want to use an existing MySQL, MariaDB, or Postgres server as your data store, then you'll need an instance available locally. However, **if you are just testing out Vendure, we recommend the quick start flow, which handles the database for you**. ## @vendure/create The recommended way to get started with Vendure is by using the [@vendure/create](https://github.com/vendure-ecommerce/vendure/tree/master/packages/create) tool. This is a command-line tool which will scaffold and configure your new Vendure project and install all dependencies. -### 1. Run the command +### Quick Start -``` +First run the following command in your terminal, replacing `my-shop` with the name of your project: + +```bash npx @vendure/create my-shop ``` -### 2. Select a database +Next choose the "Quick Start" option. This is the fastest way to get a Vendure server up and running, and will handle +all the configuration for you. If you have Docker Desktop installed, it will create and configure a Postgres database for you. If not, it will use SQLite. + +```text +┌ Let's create a Vendure App ✨ +│ +◆ How should we proceed? +// highlight-next-line +│ ● Quick Start (Get up an running in a single step) +│ ○ Manual Configuration +└ +``` + +And that's it! After a minute or two you'll have a fully-functional Vendure server running locally. + +### Manual Configuration + +If you'd rather have more control over the configuration, you can choose the "Manual Configuration" option. +This will prompt you to select a database, and whether to populate the database with sample data. + +#### 1. Select a database Vendure supports a number of different databases. The `@vendure/create` tool will prompt you to select one. @@ -40,7 +64,7 @@ If you select MySQL, MariaDB or Postgres, you need to make sure you: 3. know the username and password for a user with access to that database ::: -### 3. Populate with data +#### 2. Populate with data The final prompt will ask whether to populate your new Vendure server with some sample product data. @@ -50,7 +74,7 @@ building your own storefront. ![Vendure Create step 2](./create-2.webp) -### 4. Complete setup +#### 3. Complete setup Next, a project scaffold will be created and dependencies installed. This may take a few minutes. @@ -59,7 +83,7 @@ Once complete, you'll see a message like this: ![Vendure Create step 3](./create-3.webp) -### 5. Start the server +### Start the server Follow the instructions to move into the new directory created for your project, and start the server: @@ -95,11 +119,13 @@ Use `npx vendure add` to start adding plugins & custom functionality to your Ven ### Troubleshooting -If you encounter any issues during installation, you can get a more detailed output by setting the log level to `verbose`: - -```sh -npx @vendure/create my-shop --log-level verbose -``` +- If you encounter any issues during installation, you can get a more detailed output by setting the log level to `verbose`: + ```sh + npx @vendure/create my-shop --log-level verbose + ``` +- The [supported TypeScript version](https://github.com/vendure-ecommerce/vendure/blob/master/packages/create/src/constants.ts#L7) is set upon installation. Upgrading to a newer version of TypeScript might result in compilation errors because + TypeScript sometimes introduces stricter checks in newer versions. +- If you want to use **Yarn**, from Vendure v2.2.0+, you'll need to use **Yarn 2** (Berry) or above. ## Set up a storefront