Skip to content

Commit

Permalink
roll back express upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
tevko committed Dec 14, 2024
1 parent fd0a2fd commit 8b5cd59
Show file tree
Hide file tree
Showing 4 changed files with 1,550 additions and 478 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
build/
prod.env
xids.csv
preprod.env
14 changes: 7 additions & 7 deletions server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ dotenv.config();

import Promise from "bluebird";
import express from "express";
import compression from "compression";
import cookieParser from "cookie-parser";
import bodyParser from "body-parser";
// import compression from "compression";
// import cookieParser from "cookie-parser";
// import bodyParser from "body-parser";
import morgan from "morgan";

import Config from "./src/config";
Expand Down Expand Up @@ -225,16 +225,16 @@ helpersInitialized.then(
app.use(middleware_responseTime_start);

app.use(redirectIfNotHttps);
app.use(cookieParser());
// app.use(bodyParser());
app.use(express.cookieParser());
app.use(express.bodyParser());
app.use(writeDefaultHead);

if (devMode) {
app.use(compression());
app.use(express.compress());
} else {
// Cloudflare would apply gzip if we didn't
// but it's about 2x faster if we do the gzip (for the inbox query on mike's account)
app.use(compression());
app.use(express.compress());
}
app.use(middleware_log_request_body);
app.use(middleware_log_middleware_errors);
Expand Down
Loading

0 comments on commit 8b5cd59

Please sign in to comment.