-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
27 lines (20 loc) · 748 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
(function() {
'use strict';
var argv = require('minimist')(process.argv.slice(2));
var config = require('nconf');
var path = require('path');
var express = require('express');
var Modules = require('./modules');
config.file({ file: argv.config || 'config.json' });
var app = express();
var http = require('http').Server(app);
app.set('view engine', 'pug');
var implementation = require(config.get('implementation'))();
app.set('views',implementation.views);
app.use(express.static(implementation.static));
app.use(express.static(path.join(__dirname, 'public')));
implementation.routes(app, config, Modules);
http.listen(3000, function(){
console.log('listening on *:3000');
});
}).call(this);