talasila | 4ad39a5 | 2017-02-07 15:03:57 -0500 | [diff] [blame] | 1 | 'use strict'; |
| 2 | //let serverCommon = require('ssp_server_common'); |
| 3 | let express = require('express'); |
| 4 | let config = require('./config/environment'); |
| 5 | |
| 6 | //let logger = serverCommon.getLogger(config); |
| 7 | // Setup server |
| 8 | let app = express(); |
| 9 | let server = require('http').createServer(app); |
| 10 | require('./config/express')(app); |
| 11 | require('./routes')(app); |
| 12 | |
| 13 | // Start server |
| 14 | server.listen(config.port, config.ip, ()=> { |
| 15 | console.log('Express server listening on %d port, in %s mode', config.port, config.ip); |
| 16 | }); |
| 17 | |
| 18 | // Expose app |
| 19 | module.exports = app; |