diff --git a/.codesandbox/tasks.json b/.codesandbox/tasks.json new file mode 100644 index 0000000000..11fc788c2d --- /dev/null +++ b/.codesandbox/tasks.json @@ -0,0 +1,23 @@ +{ + // These tasks will run in order when initializing your CodeSandbox project. + "setupTasks": [ + { + "command": "yarn install", + "name": "Installing Dependencies" + } + ], + + // These tasks can be run from CodeSandbox. Running one will open a log in the app. + "tasks": { + "start": { + "name": "start", + "command": "yarn start", + "runAtStart": true + }, + "server": { + "name": "server", + "command": "yarn server", + "runAtStart": false + } + } +} diff --git a/app.js b/app.js index 5ab128e4b4..147d41f2e3 100644 --- a/app.js +++ b/app.js @@ -2,9 +2,11 @@ const express = require("express"); const app = express(); const port = process.env.PORT || 3001; -app.get("/", (req, res) => res.type('html').send(html)); +app.get("/", (req, res) => res.type("html").send(html)); -const server = app.listen(port, () => console.log(`Example app listening on port ${port}!`)); +const server = app.listen(port, () => + console.log(`Example app listening on port ${port}!`) +); server.keepAliveTimeout = 120 * 1000; server.headersTimeout = 120 * 1000; @@ -54,8 +56,8 @@ const html = `