-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathserver.js
More file actions
27 lines (20 loc) · 723 Bytes
/
server.js
File metadata and controls
27 lines (20 loc) · 723 Bytes
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
'use strict';
var express = require('express');
var path = require('path');
var app = express();
// Setup View Engines
app.set('views', path.join(__dirname, 'views'));
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');
// Serve files from your "public" directory
app.use('/public', express.static(path.join(__dirname, '/public')));
// Serve files from your "bower_components" directory
app.use('/bower_components', express.static(path.join(__dirname, '/bower_components')));
// GET index.html route
app.get('/', function(req, res) {
return res.render('index');
});
// Start our server and start to listen
app.listen(process.env.PORT || 3000, function() {
console.log('listening');
});