Repository navigation
Expand file tree
/
Copy pathapp.js
More file actions
70 lines (58 loc) · 1.97 KB
/
Copy pathapp.js
File metadata and controls
70 lines (58 loc) · 1.97 KB
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
const express = require('express');
const expressLayouts = require('express-ejs-layouts');
const dotenv = require('dotenv');
const path = require('path');
const PORT = process.env.PORT || 3000
dotenv.config();
const app = express();
app.use(expressLayouts);
app.set("view engine", "ejs");
app.use(express.static(path.join(__dirname, 'public')));
app.set('layout', './layouts/main-layout');
app.get('/', async(req, res) => {
res.render('index', {
title: 'Dashboard',
customPluginScripts: `<script src="assets/plugins/apexcharts-bundle/js/apexcharts.min.js"></script>
<script src="assets/js/dashboard.js"></script>
`,
customScripts: '<script src="assets/js/nft.js"></script>'
});
});
app.get('/ddos', async(req, res) => {
res.render('ddos', {
title: 'DDos Test',
customPluginScripts: null,
customScripts: '<script src="assets/js/pages/ddos.js"></script>'
});
});
app.get('/cyber', async(req, res) => {
res.render('cyber', {
title: 'Cyber Security Research',
customPluginScripts: null,
customScripts: '<script src="assets/js/pages/cyber.js"></script>'
});
});
app.get('/vulnerability', async(req, res) => {
res.render('vulnerability', {
title: 'Vulnerability Scanning',
customPluginScripts: null,
customScripts: '<script src="assets/js/pages/vulnerability.js"></script>'
});
});
app.get('/super', async(req, res) => {
res.render('super', {
title: 'Super Computer',
customPluginScripts: null,
customScripts: '<script src="assets/js/pages/super.js"></script>'
});
});
app.get('/blockchain', async(req, res) => {
res.render('blockchain', {
title: 'Blockchain Security',
customPluginScripts: null,
customScripts: '<script src="assets/js/pages/blockchain.js"></script>'
});
});
app.listen(PORT, () => {
console.log(`Server is connected on ${PORT}`);
})