a few changes to make A/B testing easier
This commit is contained in:
parent
b2f76d2df9
commit
53e822964e
94 changed files with 4566 additions and 3958 deletions
26
server/prod.js
Normal file
26
server/prod.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
const express = require('express');
|
||||
const path = require('path');
|
||||
const Raven = require('raven');
|
||||
const config = require('./config');
|
||||
const routes = require('./routes');
|
||||
const pages = require('./routes/pages');
|
||||
|
||||
if (config.sentry_dsn) {
|
||||
Raven.config(config.sentry_dsn).install();
|
||||
}
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use(
|
||||
express.static(path.resolve(__dirname, '../dist/'), {
|
||||
setHeaders: function(res) {
|
||||
res.set('Cache-Control', 'public, max-age=31536000, immutable');
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
routes(app);
|
||||
|
||||
app.use(pages.notfound);
|
||||
|
||||
app.listen(1443);
|
Loading…
Add table
Add a link
Reference in a new issue