-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
23 lines (19 loc) · 661 Bytes
/
Copy pathindex.js
File metadata and controls
23 lines (19 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/** @format */
/**
* This is the starting point of application; Sets up PORT listening for server
* and imports necessary libraries.
*/
const express = require("express");
const cors = require("cors");
const bodyParser = require("body-parser");
require("dotenv").config();
const app = express();
const port = process.env.PORT || 5000;
app.use(cors());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
const routes = require("./server/routes/pointsRoutes.js");
app.use("/", routes);
app.listen(port, () => console.log(`Listening on port ${port}`));