-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
37 lines (31 loc) · 900 Bytes
/
main.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
__path = process.cwd()
var express = require('express');
var router = express.Router();
router.get('/', async(req, res) => {
res.sendFile(__path + '/views/first.html')
})
router.get('/api', async(req, res) => {
res.sendFile(__path + '/views/index.html')
})
router.get('/css/style.css', async(req, res) => {
res.sendFile(__path + '/views/css/style.css')
})
router.get('/config', (req, res) => {
config = {
status: true,
result: {
prefix : 'Multi Prefix',
namabot: 'Katashi Bot',
namaowner: 'Katashi Hana',
instagram: 'k4t4sh1._',
github : 'https:\/\/github.com\/',
}
}
res.json(config)
})
//Kalo page yang di cari engga ada, nanti muncul ini:v
router.use(function (req, res) {
res.status(404)
.sendFile(__path + '/views/404.html')
});
module.exports = router