add streaming

This commit is contained in:
Emily Hou 2018-06-20 17:05:33 -07:00
parent 34cb970f11
commit 1bd7e4d486
16 changed files with 438 additions and 187 deletions

View file

@ -4,13 +4,15 @@ const Raven = require('raven');
const config = require('./config');
const routes = require('./routes');
const pages = require('./routes/pages');
const expressWs = require('express-ws');
if (config.sentry_dsn) {
Raven.config(config.sentry_dsn).install();
}
const app = express();
expressWs(app, null, { perMessageDeflate: false });
app.ws('/api/ws', require('./routes/ws')); //want to move this into routes/index.js but it's not working...
routes(app);
app.use(