-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
26 lines (21 loc) · 864 Bytes
/
index.ts
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
import * as express from 'express';
import Heartbeat from './core/heartbeat';
import Routes from './api/routes';
import {Container} from 'inversify';
import coreContainerModule from './core/configuration';
import routesContainerModule from './api/configuration';
(() => {
const container = new Container();
container.load(coreContainerModule, routesContainerModule);
const SERVER_PORT = 3001;
const heartbeat: Heartbeat = container.get<Heartbeat>('heartbeat');
const app = express();
heartbeat.start();
app.use('/', container.get<Routes>('routes').router);
app.use(express.static('node_modules/jquery/dist'));
app.use(express.static('node_modules/requirejs'));
app.use(express.static('interface'));
app.listen(SERVER_PORT, () => {
console.log('General lee is listening on port', SERVER_PORT);
});
})();