-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·51 lines (29 loc) · 1004 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import express from 'express'
import cors from 'cors'
import fs from 'fs-extra'
import ip from 'ip'
import { homedir } from "os"
import cookieParser from "cookie-parser"
import session from "express-session"
import { encriptUTF8,encriptBase64 } from "./src/apps/encript"
import rotas from "./src/routes"
import ASCIIColorLog from 'ascii-color-log';
const log = new ASCIIColorLog();
const app = express()
const PORT = 3232
app.use(cors())
app.use(cookieParser())
app.use(session({secret:"é segredo"}))
rotas(app)
app.use(express.static("src/dist"))
app.get("/",(req,res) => {
// console.log(req.cookies)
// res.cookie("idf","112")
// .json(req.cookies)
})
app.listen(PORT, async () => {
console.clear()
log.success(`CestaBuy 3.0`)
log.info(`Localhost: 127.0.0.1:${PORT}`)
log.info(`Network: ${ip.address()}:${PORT}`)
})