404
This commit is contained in:
parent
8b04c510a7
commit
cfc2d3bc9a
1 changed files with 5 additions and 0 deletions
|
@ -64,3 +64,8 @@ webServer.use(express.static('public'))
|
||||||
webServer.listen(process.env.PORT, () => {
|
webServer.listen(process.env.PORT, () => {
|
||||||
console.log('Example app listening on port '+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!")
|
||||||
|
})
|
Loading…
Reference in a new issue