-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
29 lines (21 loc) · 840 Bytes
/
index.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
var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
//app.use(express.static(__dirname + '/app'));
//app.use(express.static(__dirname + '/content'));
app.use(express.static(__dirname + '/app'));
app.use('/content', express.static(__dirname + '/content'));
app.use('/node_modules', express.static(__dirname + '/node_modules'));
app.use("*",function(req,res){
res.sendFile(path.join(__dirname,"app/index.html"));
});
// views is directory for all template files'
// app.set('views', __dirname + '/views');
// app.set('view engine', 'ejs');
/*app.get('/', function(request, response) {
//response.render('index.html');
response.sendFile(__dirname + '/index.html');
});*/
app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});