-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbitdisc.js
More file actions
23 lines (19 loc) · 780 Bytes
/
bitdisc.js
File metadata and controls
23 lines (19 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'use strict';
var express = require('express');
var config = require('./config');
var app = express();
app.use('/public/img', express.static(__dirname + '/public/img'));
app.use('/public/fonts', express.static(__dirname + '/public/fonts'));
app.get('/', function(req, res) {
res.sendFile(__dirname + '/public/html/index.html');
});
app.get('/public/js/bundle.js', function(req, res) {
res.sendFile(__dirname + '/public/js/bundle' + (config.profile === 'dev' ? '' : '.min') + '.js');
});
app.get('/public/css/bundle.css', function(req, res) {
res.sendFile(__dirname + '/public/css/bundle' + (config.profile === 'dev' ? '' : '.min') + '.css');
});
for(var i = 0; i < config.express.listen.length; ++i) {
var x = config.express.listen[i];
app.listen(x.port, x.host);
}