-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
36 lines (31 loc) · 1.44 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
const express = require("express");
const config = require("./config/cnf");
const login = require("./middleware/oauth");
const app = express();
const session = require('express-session');
const upload = require("./config/uploads");
const multer = require("multer");
const path = require("path");
const ejs = require("ejs");
const bodyParser = require("body-parser");
const fs = require("fs");
const router = require("./router/home");
const open = require("./open");
app.use(bodyParser.urlencoded({ extended: true }));
app.set('view engine', 'ejs');
app.use(session({
secret: config.secret,
resave: false,
saveUninitialized: true,
}));
app.use(express.static(path.join(__dirname, "public/")))
app.use('/', router);
app.listen(config.port, () =>{
console.log(`┌───────────────────────────────────────────────────┐`);
console.log(`│ 🎈 Html Panel v1 Project │`);
console.log(`│🛬 listen in admin panel: ${config.port} │`);
open(() => {;
}); console.log("│🛬 open in main server: https://localhost │")
console.log(`│ 🎐 Create in ewriq https://gitub.com/ewriq │`);
console.log(`└───────────────────────────────────────────────────┘`);
})