mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-02-20 20:29:04 +00:00
Added 500 error page
This commit is contained in:
parent
54e73085c6
commit
79e786f3b8
@ -39,7 +39,9 @@ safe.use(function (req, res, next) {
|
||||
})
|
||||
|
||||
safe.use(function (err, req, res, next) {
|
||||
res.status(500).end()
|
||||
res.status(500).sendFile('500.html', {
|
||||
root: './pages/error/',
|
||||
})
|
||||
})
|
||||
|
||||
safe.listen(config.port, () => console.log(`loli-safe started on port ${config.port}`))
|
47
pages/error/500.html
Normal file
47
pages/error/500.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>loli-safe</title>
|
||||
|
||||
<link href='//fonts.googleapis.com/css?family=Lato:100' rel='stylesheet' type='text/css'>
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
color: #B0BEC5;
|
||||
display: table;
|
||||
font-weight: 100;
|
||||
font-family: 'Lato';
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 72px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="title">Internal server error.</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user