-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
27 lines (23 loc) · 787 Bytes
/
app.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
const express = require("express");
const cookieParser = require("cookie-parser");
const path = require("path");
const app = express();
app.set("view engine", "ejs");
app.use(express.json());
app.use(cookieParser());
app.use(express.urlencoded({ extended: true }));
app.set("views", path.join(__dirname, "views"));
app.use(express.static(path.join(__dirname, "public")));
// routes
const DashboardRoute = require('./routes/dashboardRoute')
const AuthRoute = require('./routes/authRoute')
const IPFSRoute = require('./routes/ipfsRoutes.js')
app.use('/',DashboardRoute)
app.use('/auth',AuthRoute)
app.use('/ipfs',IPFSRoute)
PORT = 52332
app.listen(PORT, () => {
console.log(`Server Listening on http://localhost:${PORT}/`);
}).on("error", function(err) {
console.log(err);
});