-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
29 lines (22 loc) · 858 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
26
27
28
29
'use strict'
const path = require('path');
const http = require('http');
const express = require('express');
const logger = require('log4js').getLogger();
const config = require('./config/config.json');
const db = require('./config/database');
config.root = path.join(__dirname);
db.connect(config);
const app = express();
require('./config/express')(app);
require('./config/api.routes')(app);
require('./config/front.routes')(app);
const port = config.port;
http.createServer(app).listen(port);
logger.info('####################################');
logger.info('## ##');
logger.info('## Server started ##');
logger.info('## ##');
logger.info('####################################');
logger.info('App started in port:', port);
logger.info('Node version:', process.version);