diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -221,18 +221,18 @@ app.use('/', downloadRouter) | |||
221 | app.use('/', lazyStaticRouter) | 221 | app.use('/', lazyStaticRouter) |
222 | 222 | ||
223 | // Client files, last valid routes! | 223 | // Client files, last valid routes! |
224 | const cliOptions = cli.opts() | 224 | const cliOptions = cli.opts<{ client: boolean, plugins: boolean }>() |
225 | if (cliOptions.client) app.use('/', clientsRouter) | 225 | if (cliOptions.client) app.use('/', clientsRouter) |
226 | 226 | ||
227 | // ----------- Errors ----------- | 227 | // ----------- Errors ----------- |
228 | 228 | ||
229 | // Catch unmatched routes | 229 | // Catch unmatched routes |
230 | app.use((req, res: express.Response) => { | 230 | app.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 |
235 | app.use((err, req, res: express.Response, next) => { | 235 | app.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) { |