-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
34 lines (27 loc) · 839 Bytes
/
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
const express = require('express');
const app = express();
const { serverPort } = require('./config/config.json');
// Custom Console Library
const conlog = require('./utils/console');
// Remove Express Header on Responses
app.disable('x-powered-by');
// Set ejs as view engine for Express
app.set('view engine', 'ejs');
// Custom CSS Implementation
app.use('/public', express.static('public'));
// Add other routing modules
const uiRoutes = require('./routes/ui');
app.use('/ui', uiRoutes);
const apiRoutes = require('./routes/api');
app.use('/api', apiRoutes);
app.get('/', (req, res) => {
res.redirect('/ui');
});
app.listen(serverPort, () => {
conlog.welcome(
`Oxi-Revised started on port ${serverPort}!`
);
conlog.welcome(
`Created by Foggy -> https://github.com/Foggy-J/Oxi-Revised\n`
);
});