mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 18:32:50 +00:00
added blogpost and switched to ejs
This commit is contained in:
6
app.js
6
app.js
@@ -7,6 +7,7 @@ var bodyParser = require('body-parser');
|
||||
|
||||
var index = require('./routes/index');
|
||||
var success = require('./routes/success');
|
||||
|
||||
var mongoose = require('mongoose');
|
||||
var mainLoop = require('./main');
|
||||
|
||||
@@ -22,7 +23,7 @@ db.once('open', function (callback) {
|
||||
|
||||
// view engine setup
|
||||
app.set('views', path.join(__dirname, 'views'));
|
||||
app.set('view engine', 'jade');
|
||||
app.set('view engine', 'ejs');
|
||||
|
||||
// uncomment after placing your favicon in /public
|
||||
app.use(favicon(__dirname + '/public/favicon.ico'));
|
||||
@@ -33,7 +34,8 @@ app.use(cookieParser());
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
|
||||
app.use('/', index);
|
||||
app.use('/success', success)
|
||||
app.use('/success', success);
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
app.use(function(req, res, next) {
|
||||
var err = new Error('Not Found');
|
||||
|
||||
Reference in New Issue
Block a user