-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathserver.js
More file actions
32 lines (24 loc) · 716 Bytes
/
server.js
File metadata and controls
32 lines (24 loc) · 716 Bytes
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
require('dotenv').config();
const express = require('express');
const bodyParser = require('body-parser')
var cookieParser = require('cookie-parser');
const PORT = process.env.SERVER_PORT || 8888;
//// Routes
// const spotifyApi = require('./routes/spotify');
//// Server
const app = express();
app.set("view engine", "ejs");
// Tells app to use the public as the static file location
app.use(express.static('public'))
.use(cookieParser());
//// Middleware
app.use(bodyParser.urlencoded({ extended: true }));
//// Routes
// app.use("/", spotifyApi());
app.get("/", (req, res) => {
res.render("index");
});
// Start Server
app.listen(PORT, () => {
console.log(`VIS app listening on port ${PORT}`);
} );