Added maintenance page
This commit is contained in:
1 parent
b774ae1192
commit
293cc20546
3 files changed
+55
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
module.exports = {
|
||||
maintenance: true,
|
||||
mongodb: "mongodb+srv://root:RzIhDff90LKkOOjw@cluster0.jo9hd.mongodb.net/?retryWrites=true&w=majority",
|
||||
bot: {
|
||||
id: "934087523649609768",
|
||||
|
||||
+12
-2
@@ -17,6 +17,18 @@ var auth = require('./routers/auth');
|
||||
var servers = require('./routers/servers');
|
||||
var api = require('./routers/api');
|
||||
var client = require('../index');
|
||||
app.set('view engine', 'ejs');
|
||||
app.set('views', path.join(__dirname, '/views'));
|
||||
if(global.config.maintenance) {
|
||||
console.log(colors.red("[MAINTENANCE]") + " Bot is in maintenance mode.");
|
||||
app.get('/', (req, res) => {
|
||||
res.render('maintenance');
|
||||
})
|
||||
app.listen(port, () => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
passport.serializeUser(function (user, done) {
|
||||
done(null, user);
|
||||
});
|
||||
@@ -62,8 +74,6 @@ app.use(passport.session());
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
// set up view engine
|
||||
app.set('view engine', 'ejs');
|
||||
app.set('views', path.join(__dirname, '/views'));
|
||||
// set up static files
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
// Import routers
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<!doctype html>
|
||||
<title>Site Maintenance</title>
|
||||
<style>
|
||||
body {
|
||||
text-align: center;
|
||||
padding: 150px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 50px;
|
||||
}
|
||||
|
||||
body {
|
||||
font: 20px Helvetica, sans-serif;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
article {
|
||||
display: block;
|
||||
text-align: left;
|
||||
width: 650px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #dc8100;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<article>
|
||||
<h1>We’ll be back soon!</h1>
|
||||
<div>
|
||||
<p>Sorry for the inconvenience but we’re performing some maintenance at the moment. If you need to you can always <a href="https://discord.gg/uq8fAfAFH6">contact us</a>, otherwise we’ll be back online shortly!</p>
|
||||
<p>— BotsCord</p>
|
||||
</div>
|
||||
</article>
|
||||
Reference in new issue
Block a user