diff --git a/src/index.ts b/src/index.ts index b9f4ca3..5f58443 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,4 +63,9 @@ webServer.use(express.static('public')) webServer.listen(process.env.PORT, () => { console.log('Example app listening on port '+process.env.PORT+'!') +}) + +// when client try to access 404 file +webServer.use(function (req, res, next) { + res.status(404).send("Sorry can't find that!") }) \ No newline at end of file