forked from zbodie/Graph-Paper-Programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
23 lines (18 loc) · 656 Bytes
/
app.js
File metadata and controls
23 lines (18 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var express = require('express')
, http = require('http')
, path = require('path')
, favicon = require('express-favicon')
, ejs = require('ejs')
, port = process.argv[2] || process.env.PORT || 3004;
var app = express();
app.set('port', port);
app.set('views', __dirname + '/views');
app.use(express.static(path.join(__dirname, 'public')));
app.use(express.static(path.join(__dirname, 'bower_components')));
app.engine('.html', ejs.renderFile);
app.get('/', function(req, res) {
res.render('index.html');
});
http.createServer(app).listen(app.get('port'), function() {
console.log('Express server listening on port ' + app.get('port'));
});