mirror of
https://github.com/directus/directus.git
synced 2026-01-23 07:47:58 -05:00
Simplify dev env setup (#4845)
* simplify dev env setup * Recommend bootstrap instead of updating init for prod Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
# Running Locally
|
||||
|
||||
> This guide explains how to install the _Development_ version of Directus locally so that you can work on the platform's source code. To install the _Production_ version locally, please follow to our [standard installation guides](/getting-started/installation/).
|
||||
> This guide explains how to install the _Development_ version of Directus locally so that you can work on the
|
||||
> platform's source code. To install the _Production_ version locally, please follow to our
|
||||
> [standard installation guides](/getting-started/installation/).
|
||||
|
||||
::: tip Minimum Requirements
|
||||
|
||||
You will need to have [the latest version of Node](https://nodejs.org/en/download/current/) to _build_ a Development version of Directus.
|
||||
You will need to have [the latest version of Node](https://nodejs.org/en/download/current/) to _build_ a Development
|
||||
version of Directus.
|
||||
|
||||
:::
|
||||
|
||||
@@ -32,16 +35,23 @@ git checkout -b YOUR-BRANCH-NAME
|
||||
npm install
|
||||
```
|
||||
|
||||
## 5. Setup the Database & Env File
|
||||
## 5. Create a `.env` file
|
||||
|
||||
Create a `.env` file under the `api` folder the API to use. You can use the `example.env` file provided under `api` as a
|
||||
starting point.
|
||||
|
||||
## 6. Setup the Database
|
||||
|
||||
For this step, you'll need to already have a SQL database up-and-running, otherwise you can only use the SQLite driver,
|
||||
which will create the database for you. Run the following command from within root of the project:
|
||||
|
||||
```bash
|
||||
npm run cli -- init
|
||||
npm run cli bootstrap
|
||||
```
|
||||
|
||||
## 6. Start the development server
|
||||
This will install Directus, and make sure all the migrations have run.
|
||||
|
||||
## 7. Start the development server
|
||||
|
||||
Run the following command from the root directory.
|
||||
|
||||
@@ -49,7 +59,8 @@ Run the following command from the root directory.
|
||||
npm run dev
|
||||
```
|
||||
|
||||
If you are only looking to work on the Documentation (public website version), you can navigate to the `docs` directory and run the following command:
|
||||
If you are only looking to work on the Documentation (public website version), you can navigate to the `docs` directory
|
||||
and run the following command:
|
||||
|
||||
```bash
|
||||
npm run dev:site
|
||||
@@ -62,7 +73,7 @@ If you encounter errors during this installation process, make sure your node ve
|
||||
|
||||
:::
|
||||
|
||||
## 7. Make your fixes/changes
|
||||
## 8. Make your fixes/changes
|
||||
|
||||
At this point you are ready to start working on Directus! Before diving in however, it's worth reading through our docs
|
||||
on [submitting a pull-request](#Submitting-a-Pull-Request).
|
||||
|
||||
Reference in New Issue
Block a user