refactor: avoid automatic execution of app.ts

Move the execution of configureApp to CLI file

Related to #2
This commit is contained in:
Jovan Krunić
2019-07-04 11:30:49 +02:00
committed by Rainer Killinger
parent 9adc0b88d7
commit 59ea7a5ba6
2 changed files with 10 additions and 10 deletions

View File

@@ -15,7 +15,7 @@
*/
import {Logger} from '@openstapps/logger';
import * as http from 'http';
import {app} from './app';
import {app, configureApp} from './app';
/**
* Get port from environment and store in Express.
@@ -94,3 +94,11 @@ function onListening() {
: `port ${addr.port}`;
Logger.ok(`Listening on ${bind}`);
}
configureApp()
.then(() => {
Logger.ok('Sucessfully configured express server');
})
.catch((err) => {
throw err;
});