You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: advanced/source.md
+11-15
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ To quickly debug the application you can use [our demo API](https://next.demo-ap
88
88
89
89
### Requirements
90
90
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.
92
92
93
93
The application source code is being hosted in the [directus/app](https://github.com/directus/app) repo on GitHub.
If you want to work on your fork of the project, remember to replace `directus` with your GitHub username in the url above.
113
113
:::
114
114
115
-
#### 2. Install the [npm](https://npmjs.com)dependencies
115
+
#### 2. Install the dependencies using Yarn
116
116
117
117
```bash
118
-
npm install
118
+
yarn install
119
119
```
120
120
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
130
122
131
123
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
132
124
133
125
```bash
134
-
npm run build
126
+
yarn build
135
127
```
136
128
137
129
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).
138
130
139
131
Install `http-server` globally, run
140
132
141
133
```bash
142
-
npm install --global http-server
134
+
yarn global add http-server
143
135
```
144
136
145
137
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
150
142
```
151
143
152
144
::: 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`.
0 commit comments