forked from dineshkummarc/node-express-twitter-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
27 lines (21 loc) · 684 Bytes
/
server.js
File metadata and controls
27 lines (21 loc) · 684 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
/*
* server.js
*
* The main file, to be invoked at the command line. Calls app.js to get
* the Express app object.
*/
var app = require('./app').init(4000);
var locals = {
title: 'Node | Express | EJS | Boostrap',
description: 'A Node.js applicaton bootstrap using Express 3.x, EJS, Twitter Bootstrap, and CSS3',
author: 'C. Aaron Cois, Alexandre Collin',
_layoutFile: true
};
app.get('/', function(req,res){
locals.date = new Date().toLocaleDateString();
res.render('home.ejs', locals);
});
/* The 404 Route (ALWAYS Keep this as the last route) */
app.get('/*', function(req, res){
res.render('404.ejs', locals);
});