mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-23 21:02:15 +00:00
29 lines
No EOL
645 B
JavaScript
29 lines
No EOL
645 B
JavaScript
"use strict";
|
|
|
|
var path = require("path");
|
|
var winston = require("winston");
|
|
var config = require("./config.js");
|
|
|
|
module.exports = app => {
|
|
app.get("/", (request, response, next) => {
|
|
response.render("index.hbs", {
|
|
redirect: config.ensl_url,
|
|
bot_url: config.steam_bot_link
|
|
});
|
|
});
|
|
|
|
app.get("/redirect", (request, response, next) => {
|
|
response.render("redirect.hbs", {
|
|
redirect: config.ensl_url
|
|
});
|
|
});
|
|
|
|
app.get("*", (request, response) => {
|
|
response.status(404).render("404.hbs");
|
|
});
|
|
|
|
app.use(function (error, request, response, next) {
|
|
winston.error(error);
|
|
return response.status(500).render("500.hbs");
|
|
});
|
|
}; |