-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
129 lines (81 loc) · 2.41 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// Importing
const express = require('express');
const session = require("express-session");
const app = express();
const chalk = require('chalk');
const ejs = require("ejs");
const config = require("./config.json");
const port = config.website.port
const domain = config.website.domain;
// Exporting Module's
module.exports.app = app;
// Setting View Point
app.enable("trust proxy")
app.set('views',"./Pages");
app.set('view engine','ejs');
app.locals.domain = config.website.domain.split("//")[1];
app.use("/assets", express.static("./assets"))
app.use(
session({
secret: config.website.secret,
resave: false,
saveUninitialized: false
})
);
// Website Pages
app.get("/", (req, res) => {
res.render("index.ejs", {config: config});
});
app.get("/privacy", (req, res) => {
res.render("privacy.ejs", {config: config});
});
app.get("/terms", (req, res) => {
res.render("terms.ejs", {config: config});
});
app.get("/status", (req, res) => {
res.render("status.ejs", {config: config});
});
app.get("/about", (req, res) => {
res.render("about.ejs", {config: config});
});
app.get("/services", (req, res) => {
res.render("services.ejs", {config: config});
});
app.get("/support", (req, res) => {
res.redirect(config.support);
});
app.get("/discord", (req, res) => {
res.redirect(config.support);
});
app.get("/server", (req, res) => {
res.redirect(config.support);
});
app.get("/review", (req, res) => {
res.redirect(config.review);
});
// Client Domain
app.get("/client", (req, res) => {
res.redirect(config.hosting.client_domain);
});
app.get("/dash", (req, res) => {
res.redirect(config.hosting.client_domain);
});
app.get("/cp", (req, res) => {
res.redirect(config.hosting.client_domain);
});
// Panel Domain
app.get("/panel", (req, res) => {
res.redirect(config.hosting.panel_domain);
});
app.get("/control", (req, res) => {
res.redirect(config.hosting.panel_domain);
});
app.get("/gp", (req, res) => {
res.redirect(config.hosting.panel_domain);
});
app.use(function (req, res, next) {
res.status(404).render("404.ejs", {config: config});
});
app.listen(port, domain, () => {
console.log(chalk.blue(chalk.bold(`System`)), (chalk.white(`>>`)), chalk.red(`Website Ruing On`), chalk.green(`${domain}${port}`))
});