2022-02-15 16:17:14 -07:00
|
|
|
'use strict';
|
|
|
|
|
2022-02-23 20:25:05 -07:00
|
|
|
console.log('server process.env.NODE_ENV', process.env.NODE_ENV);
|
|
|
|
|
2022-02-15 16:17:14 -07:00
|
|
|
const express = require('express');
|
2022-02-23 20:25:05 -07:00
|
|
|
|
2022-02-15 16:17:14 -07:00
|
|
|
const installRoutes = require('./routes/install-routes');
|
2022-02-23 20:25:05 -07:00
|
|
|
const config = require('./lib/config');
|
|
|
|
const basePort = config.get('basePort');
|
2022-02-15 16:17:14 -07:00
|
|
|
|
|
|
|
const app = express();
|
|
|
|
installRoutes(app);
|
2022-02-23 20:25:05 -07:00
|
|
|
|
|
|
|
const server = app.listen(basePort);
|
|
|
|
|
|
|
|
module.exports = server;
|