-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
23 lines (19 loc) · 1.45 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
require("dotenv").config({ path: __dirname + "/.env" });
const http = require("http");
const app = require("./app.js");
const server = http.createServer(app);
const PORT = process.env.PORT || 9000;
const IP = process.env.IP || `0.0.0.0`;
server.listen(PORT, IP, () =>
console.log(
`╔════════════════════════════════════════════════════════════════╗
║ Server is running (${process.env.NODE_ENV}) on ip: ${IP} and port: ${PORT}. ║
╟────────────────────────────────────────────────────────────────╢
║ >> Visit: http://localhost:${PORT}/api/health/ ║
║ >> Draft: http://localhost:${PORT}/api/docs/ ║
║ >> Admin: http://localhost:${PORT}/admin/ ║
╟────────────────────────────────────────────────────────────────╢
║ Please press CTRL + C to stop the server. ║
╚════════════════════════════════════════════════════════════════╝`,
),
);