forked from outline/outline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (25 loc) · 740 Bytes
/
index.js
File metadata and controls
28 lines (25 loc) · 740 Bytes
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
27
28
// @flow
require('./init');
if (process.env.NODE_ENV === 'production') {
console.log(
'\n\x1b[33m%s\x1b[0m',
'Running Outline in production mode. Use `yarn dev` to run in development with live code reloading'
);
} else if (process.env.NODE_ENV === 'development') {
console.log(
'\n\x1b[33m%s\x1b[0m',
'Running Outline in development mode with hot reloading. To run Outline in production mode, use `yarn start`'
);
}
if (
!process.env.SECRET_KEY ||
process.env.SECRET_KEY ===
'F0E5AD933D7F6FD8F4DBB3E038C501C052DC0593C686D21ACB30AE205D2F634B'
) {
console.error(
'Please set SECRET_KEY env variable with output of `openssl rand -hex 32`'
);
// $FlowFixMe
process.exit(1);
}
require('./server');