aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server.ts b/server.ts
index ad162832b..559327f16 100644
--- a/server.ts
+++ b/server.ts
@@ -221,18 +221,18 @@ app.use('/', downloadRouter)
221app.use('/', lazyStaticRouter) 221app.use('/', lazyStaticRouter)
222 222
223// Client files, last valid routes! 223// Client files, last valid routes!
224const cliOptions = cli.opts() 224const cliOptions = cli.opts<{ client: boolean, plugins: boolean }>()
225if (cliOptions.client) app.use('/', clientsRouter) 225if (cliOptions.client) app.use('/', clientsRouter)
226 226
227// ----------- Errors ----------- 227// ----------- Errors -----------
228 228
229// Catch unmatched routes 229// Catch unmatched routes
230app.use((req, res: express.Response) => { 230app.use((_req, res: express.Response) => {
231 res.status(HttpStatusCode.NOT_FOUND_404).end() 231 res.status(HttpStatusCode.NOT_FOUND_404).end()
232}) 232})
233 233
234// Catch thrown errors 234// Catch thrown errors
235app.use((err, req, res: express.Response, next) => { 235app.use((err, _req, res: express.Response, _next) => {
236 // Format error to be logged 236 // Format error to be logged
237 let error = 'Unknown error.' 237 let error = 'Unknown error.'
238 if (err) { 238 if (err) {