forked from nanobox-quickstarts/nanobox-ghost
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
25 lines (18 loc) · 986 Bytes
/
app.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
var config = require('./node_modules/ghost/core/server/config'),
ghostVersion = require('./node_modules/ghost/core/server/utils/ghost-version');
require('./node_modules/ghost/core/server/overrides');
//since the config files are now json instead of js, this is the easiest
//way to set the config from environment variables.
config.set('database:connection:host', process.env.DATA_DB_HOST);
config.set('database:connection:user', process.env.DATA_DB_USER);
config.set('database:connection:password', process.env.DATA_DB_PASS);
//these two environment variables need to be created on the dashboard,
//or via `nanobox add Name Value`
//this also assumes that you are using Mailgun as the provider
config.set('mail:options:auth:user', process.env.MAIL__OPTIONS__AUTH__USER);
config.set('mail:options:auth:pass', process.env.MAIL__OPTIONS__AUTH__PASS);
var ghost = require('ghost');
var path = require('path');
ghost().then(function (ghostServer) {
ghostServer.start();
});