removes useless timeout configuration

This commit is contained in:
@wwwjim 2020-10-04 22:39:02 -07:00
parent 6826c3fef7
commit 88df9ca745
2 changed files with 3 additions and 24 deletions

View File

@ -8,8 +8,8 @@
"node": "14.7.0"
},
"scripts": {
"dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 node . --unhandled-rejections=strict --keepAliveTimeout 900000 --max-old-space-size=2048",
"start": "NODE_ENV=production node . --unhandled-rejections=strict --keepAliveTimeout 900000 --max-old-space-size=2048",
"dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 node . --unhandled-rejections=strict --max-old-space-size=2048",
"start": "NODE_ENV=production node . --unhandled-rejections=strict --max-old-space-size=2048",
"build-delete": "rm -rf .next && rm -rf dist/mac",
"build": "NODE_ENV=production next build",
"build-system": "rollup -c",

View File

@ -35,9 +35,6 @@ app.prepare().then(async () => {
server.use(compression());
}
server.keepAliveTimeout = 15 * 60 * 1000;
server.headersTimeout = 16 * 60 * 1000;
server.use("/public", express.static("public"));
server.get("/please-dont-use-timeout", async (r, s) => {
@ -60,27 +57,9 @@ app.prepare().then(async () => {
s.redirect(`/_/experiences/${r.params.m}`)
);
server.all("/api/:a", async (r, s, next) => {
r.setTimeout(15 * 60 * 1000, function() {
console.log("REQUEST TIMED OUT");
});
s.setTimeout(15 * 60 * 1000, function() {
console.log("RESPONSE TIMED OUT");
s.send(408);
});
return handler(r, s, r.url);
});
server.all("/api/:a/:b", async (r, s, next) => {
r.setTimeout(15 * 60 * 1000, function() {
console.log("REQUEST TIMED OUT");
});
s.setTimeout(15 * 60 * 1000, function() {
console.log("RESPONSE TIMED OUT");
s.send(408);
});
return handler(r, s, r.url);
});
@ -276,7 +255,7 @@ app.prepare().then(async () => {
server.all("*", async (r, s) => handler(r, s, r.url));
const listenServer = server.listen(Environment.PORT, async (e) => {
const listenServer = server.listen(Environment.PORT, (e) => {
if (e) throw e;
console.log(`[ slate ] client: http://localhost:${Environment.PORT}`);