mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix start script (#8024)
This commit is contained in:
committed by
GitHub
parent
26f704a5f5
commit
2f319d4f24
@@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('./dist/start.js').default();
|
||||
require('./dist/start.js');
|
||||
|
||||
@@ -14,9 +14,9 @@ available. Since iisnode simply pipes requests to files, running the directus CL
|
||||
this, use an entrypoint script like the `index.js` below.
|
||||
|
||||
```js
|
||||
var { default: start } = require('directus/dist/start');
|
||||
var { startServer } = require('directus/dist/server');
|
||||
|
||||
start();
|
||||
startServer();
|
||||
```
|
||||
|
||||
## web.config
|
||||
|
||||
@@ -49,15 +49,15 @@ do not need to worry about choosing a specific port. Just use an arbitrary numbe
|
||||
Add Directus and your database connector as a dependency. To execute Directus' `bootstrap` command you also have to add
|
||||
a script entry for it.
|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
"bootstrap": "directus bootstrap"
|
||||
},
|
||||
"dependencies": {
|
||||
"directus": "*",
|
||||
"mysql": "^2.18.1"
|
||||
}
|
||||
"scripts": {
|
||||
"bootstrap": "directus bootstrap"
|
||||
},
|
||||
"dependencies": {
|
||||
"directus": "*",
|
||||
"mysql": "^2.18.1"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -65,9 +65,10 @@ a script entry for it.
|
||||
|
||||
Instead of a start command, Plesk wants a startup file. So create a `index.js` with the following content:
|
||||
|
||||
```
|
||||
var { default: start } = require('directus/dist/start');
|
||||
start();
|
||||
```js
|
||||
var { startServer } = require('directus/dist/server');
|
||||
|
||||
startServer();
|
||||
```
|
||||
|
||||
### 4. Add .npmrc
|
||||
@@ -99,7 +100,7 @@ You get the console output after the script has run through.
|
||||
You may run into an error of argon2 telling you that glibc is missing. If that's the case try adding and running this
|
||||
script entry to your package.json:
|
||||
|
||||
```
|
||||
```json
|
||||
"scripts" {
|
||||
"argon2-rebuild": "npm rebuild argon2 --build-from-source",
|
||||
<...>
|
||||
|
||||
Reference in New Issue
Block a user