-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.js
More file actions
21 lines (19 loc) · 692 Bytes
/
index.js
File metadata and controls
21 lines (19 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const CONST = require('./includes/const');
const express = require("express");
const { exec } = require("child_process");
const app = express();
var ip = require("ip");
const cookieParser = require('cookie-parser');
const lowdb = require('lowdb');
const bodyParser = require('body-parser');
const FileSync = require('lowdb/adapters/FileSync'),
path = require('path'),
adapter = new FileSync('maindb.json'),
db = lowdb(adapter);
app.listen(CONST.web);
app.set('view-engine','ejs');
app.use(cookieParser());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static(__dirname + '/webpublic/'));
app.use(require('./includes/route'));