mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
run require up top
This commit is contained in:
parent
a44b8987b3
commit
06012722b3
@ -3,6 +3,7 @@
|
|||||||
const logger = require('./lib/logger');
|
const logger = require('./lib/logger');
|
||||||
const migrator = require('./migrator');
|
const migrator = require('./migrator');
|
||||||
const { createStores } = require('./lib/db');
|
const { createStores } = require('./lib/db');
|
||||||
|
const getApp = require('./app');
|
||||||
|
|
||||||
const DEFAULT_OPTIONS = {
|
const DEFAULT_OPTIONS = {
|
||||||
databaseUri: process.env.DATABASE_URL || 'postgres://unleash_user:passord@localhost:5432/unleash',
|
databaseUri: process.env.DATABASE_URL || 'postgres://unleash_user:passord@localhost:5432/unleash',
|
||||||
@ -21,7 +22,7 @@ function createApp (options) {
|
|||||||
stores,
|
stores,
|
||||||
};
|
};
|
||||||
|
|
||||||
const app = require('./app')(config);
|
const app = getApp(config);
|
||||||
const server = app.listen(app.get('port'), () => {
|
const server = app.listen(app.get('port'), () => {
|
||||||
logger.info(`Unleash started on ${app.get('port')}`);
|
logger.info(`Unleash started on ${app.get('port')}`);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user