mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-12 23:35:58 +00:00
Edit and sharing should be working, deploying for testing
This commit is contained in:
13
server.js
13
server.js
@@ -1,16 +1,27 @@
|
||||
'use strict';
|
||||
require('app-module-path').addPath('./shared');
|
||||
var vitreumRender = require('vitreum/render');
|
||||
var bodyParser = require('body-parser')
|
||||
var express = require("express");
|
||||
var app = express();
|
||||
app.use(express.static(__dirname + '/build'));
|
||||
app.use(bodyParser.json());
|
||||
|
||||
|
||||
|
||||
|
||||
//Mongoose
|
||||
var mongoose = require('mongoose');
|
||||
var mongoUri = process.env.MONGOLAB_URI || process.env.MONGOHQ_URL || 'mongodb://localhost/naturalcrit';
|
||||
mongoose.connect(mongoUri);
|
||||
mongoose.connection.on('error', function(){
|
||||
console.log(">>>ERROR: Run Mongodb.exe ya goof!");
|
||||
});
|
||||
|
||||
|
||||
app = require('./server/homebrew.api.js')(app);
|
||||
|
||||
|
||||
|
||||
app.get('*', function (req, res) {
|
||||
vitreumRender({
|
||||
page: './build/naturalCrit/bundle.dot',
|
||||
|
||||
Reference in New Issue
Block a user