fixed all.js
This commit is contained in:
parent
4978da1163
commit
2ef7eea959
4
config/env/all.js
vendored
4
config/env/all.js
vendored
@ -10,8 +10,8 @@ module.exports = {
|
||||
templateEngine: 'swig',
|
||||
|
||||
//Sentry DSN Client Key
|
||||
DSN: 'http://db01e03015ce48e2b68240ea8254b17c:5d878e9bb6c6488fbb70fb81295ee700@sentry.example.com/1'
|
||||
|
||||
DSN: 'http://db01e03015ce48e2b68240ea8254b17c:5d878e9bb6c6488fbb70fb81295ee700@sentry.example.com/1',
|
||||
|
||||
// The secret should be set to a non-guessable string that
|
||||
// is used to compute a session hash
|
||||
sessionSecret: 'MEAN',
|
||||
|
||||
@ -17,6 +17,7 @@ var fs = require('fs-extra'),
|
||||
helmet = require('helmet'),
|
||||
multer = require('multer'),
|
||||
passport = require('passport'),
|
||||
raven = require('raven'),
|
||||
mongoStore = require('connect-mongo')({
|
||||
session: session
|
||||
}),
|
||||
@ -25,6 +26,13 @@ var fs = require('fs-extra'),
|
||||
consolidate = require('consolidate'),
|
||||
path = require('path');
|
||||
|
||||
// function onError(err, req, res, next) {
|
||||
// // The error id is attached to `res.sentry` to be returned
|
||||
// // and optionally displayed to the user for support.
|
||||
// res.statusCode = 500;
|
||||
// res.end(res.sentry+'\n');
|
||||
// }
|
||||
|
||||
module.exports = function(db) {
|
||||
// Initialize express app
|
||||
var app = express();
|
||||
@ -71,7 +79,7 @@ module.exports = function(db) {
|
||||
|
||||
// Should come before any other error middleware
|
||||
app.use(raven.middleware.express.errorHandler(config.DSN));
|
||||
//app.use(onError); // optional error handler if you want to display the error id to a user
|
||||
app.use(onError); // optional error handler if you want to display the error id to a user
|
||||
|
||||
// Set swig as the template engine
|
||||
app.engine('server.view.html', consolidate[config.templateEngine]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user