mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-26 21:11:30 +00:00
Maing staging work again
This commit is contained in:
@@ -10,7 +10,7 @@ app.use(bodyParser.json({limit: '25mb'}));
|
|||||||
|
|
||||||
//Mongoose
|
//Mongoose
|
||||||
var mongoose = require('mongoose');
|
var mongoose = require('mongoose');
|
||||||
var mongoUri = process.env.MONGODB_URI || 'mongodb://localhost/naturalcrit';
|
var mongoUri = process.env.MONGODB_URI || process.env.MONGOLAB_URI || 'mongodb://localhost/naturalcrit';
|
||||||
mongoose.connect(mongoUri);
|
mongoose.connect(mongoUri);
|
||||||
mongoose.connection.on('error', function(){
|
mongoose.connection.on('error', function(){
|
||||||
console.log(">>>ERROR: Run Mongodb.exe ya goof!");
|
console.log(">>>ERROR: Run Mongodb.exe ya goof!");
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ module.exports = function(app){
|
|||||||
newHomebrew.save(function(err, obj){
|
newHomebrew.save(function(err, obj){
|
||||||
if(err){
|
if(err){
|
||||||
console.error(err, err.toString(), err.stack);
|
console.error(err, err.toString(), err.stack);
|
||||||
return res.status(500).send("Error while creating new brew");
|
return res.status(500).send(`Error while creating new brew, ${err.toString()}`);
|
||||||
}
|
}
|
||||||
return res.json(obj);
|
return res.json(obj);
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user