mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Replace require.main check with start script (#8005)
This commit is contained in:
committed by
GitHub
parent
b7779b7b48
commit
3e7d00982f
@@ -4,11 +4,6 @@ import logger from './logger';
|
||||
import checkForUpdate from 'update-check';
|
||||
import pkg from '../package.json';
|
||||
|
||||
// If this file is called directly using node, start the server
|
||||
if (require.main === module) {
|
||||
start();
|
||||
}
|
||||
|
||||
export default async function start(): Promise<void> {
|
||||
const createServer = require('./server').default;
|
||||
|
||||
|
||||
2
api/start.js
Normal file
2
api/start.js
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('./dist/start.js').default();
|
||||
Reference in New Issue
Block a user