Skip to content

Commit ea518c2

Browse files
Update source.md
1 parent 9121820 commit ea518c2

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

advanced/source.md

+11-15
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ To quickly debug the application you can use [our demo API](https://next.demo-ap
8888

8989
### Requirements
9090

91-
The application is built with [Vue.js](https://vuejs.org) and heavily relies on [Node.js](https://nodejs.org) to be bundled / transpiled to browser-usable code. In order to work on Directus, you need [Node.js](https://nodejs.org) v8.11.3 or higher (preferably v10.6+).
91+
The application is built with [Vue.js](https://vuejs.org) and heavily relies on [Node.js](https://nodejs.org) to be bundled / transpiled to browser-usable code. In order to work on Directus, you need [Node.js](https://nodejs.org) v12.x or higher.
9292

9393
The application source code is being hosted in the [directus/app](https://github.com/directus/app) repo on GitHub.
9494

@@ -112,34 +112,26 @@ git clone [email protected]:directus/app.git
112112
If you want to work on your fork of the project, remember to replace `directus` with your GitHub username in the url above.
113113
:::
114114

115-
#### 2. Install the [npm](https://npmjs.com) dependencies
115+
#### 2. Install the dependencies using Yarn
116116

117117
```bash
118-
npm install
118+
yarn install
119119
```
120120

121-
#### 3. Add a config file
122-
123-
The application makes use of a config file that's found in the `public` folder in the root of the folder. To prevent issues when upgrading the app, we decided to ignore the default version of this config file. We do provide an example that you can duplicate. Move or rename the `/public/config_example.js` file to `/public/config.js` file to your hearts content.
124-
125-
::: tip
126-
The default config file lets you test the app using the live Directus Demo API. Don't forget to add the address of your local API in order to test it.
127-
:::
128-
129-
#### 4. Build / run the app
121+
#### 3. Build / run the app
130122

131123
The production version of the application is a static html file that can be hosted on any static file server. In order to build the app for production, run
132124

133125
```bash
134-
npm run build
126+
yarn build
135127
```
136128

137129
To checkout the app itself, you'll need a static file server. Any static file server, like MAMP, local Apache or Caddy, should work. If you don't have a quick server at hand, I recommend using [`http-server`](https://www.npmjs.com/package/http-server).
138130

139131
Install `http-server` globally, run
140132

141133
```bash
142-
npm install --global http-server
134+
yarn global add http-server
143135
```
144136

145137
When it's installed, you can serve the app by running `http-server` from the `dist` folder that has been created by the `build` command:
@@ -150,5 +142,9 @@ http-server
150142
```
151143

152144
::: tip Development Mode
153-
If you're actively working on the application, we recommend using the development mode. By using `npm run dev` instead of `npm run build`, the buildchain will launch a local file server and will auto-rebuild the code and auto-refresh the browser on save of a file.
145+
If you're actively working on the application, we recommend using the development mode. By using `yarn serve` instead of `yarn build`, the buildchain will launch a local file server and will auto-rebuild the code and auto-refresh the browser on save of a file.
146+
:::
147+
148+
::: tip API Usage
149+
By default, the `yarn serve` command uses the demo API to connect to. If you want to connect to your local API instance for debugging purposes, set the `API_URL` environment variable before running `yarn serve`.
154150
:::

0 commit comments

Comments
 (0)