forked from TryGhost/Ghost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ghost.js
26 lines (22 loc) · 631 Bytes
/
ghost.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* Internal CLI Placeholder
*
* If we want to add alternative commands, flags, or modify environment vars, it should all go here.
* Important: This file should not contain any requires, unless we decide to add pretty-cli/commander type tools
*
**/
// Don't allow NODE_ENV to be null
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
const argv = process.argv;
const mode = argv[2];
const command = require('./core/cli/command');
// Switch between boot modes
switch (mode) {
case 'repl':
case 'timetravel':
command.run(mode);
break;
default:
// New boot sequence
require('./core/boot')();
}