Files
bigcapital/server/server.js
Ahmed Bouhuolia cb8c294d74 Initial commit.
2019-08-20 00:32:41 +02:00

22 lines
450 B
JavaScript

import path from 'path';
import dotenv from 'dotenv';
import errorHandler from 'errorhandler';
import app from './http/app';
dotenv.config({
path: path.join(__dirname, '.env')
});
app.use(errorHandler);
const server = app.listen(app.get('port'), () => {
console.log(
" App is running at http://localhost:%d in %s mode",
app.get("port"),
app.get("env")
);
console.log(" Press CTRL-C to stop\n");
});
export default server;