1
0
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:
Scott Tolksdorf
2015-12-20 14:21:25 -05:00
parent ef7a500940
commit 8a4d840717
7 changed files with 175 additions and 39 deletions

View File

@@ -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',