mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-12 23:45:57 +00:00
Initial commit
This commit is contained in:
30
server.js
Normal file
30
server.js
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
require('app-module-path').addPath('./shared');
|
||||
var vitreumRender = require('vitreum/render');
|
||||
var express = require("express");
|
||||
var app = express();
|
||||
app.use(express.static(__dirname + '/build'));
|
||||
|
||||
|
||||
|
||||
|
||||
app.get('*', function (req, res) {
|
||||
vitreumRender({
|
||||
page: './build/naturalCrit/bundle.dot',
|
||||
globals:{
|
||||
|
||||
},
|
||||
//prerenderWith : './client/naturalCrit/naturalCrit.jsx',
|
||||
initialProps: {
|
||||
url: req.originalUrl
|
||||
},
|
||||
clearRequireCache : true,
|
||||
}, function (err, page) {
|
||||
return res.send(page)
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var port = process.env.PORT || 8000;
|
||||
app.listen(port);
|
||||
console.log('Listening on localhost:' + port);
|
||||
Reference in New Issue
Block a user