-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
35 lines (31 loc) · 1.06 KB
/
index.js
File metadata and controls
35 lines (31 loc) · 1.06 KB
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
require("dotenv").config();
const PORT = process.env.PORT;
const express = require("express");
const app = express();
const accounts = require("./api/accounts");
const hosts = require("./api/hosts");
const artists = require("./api/artists");
const appliedGigs = require("./api/appliedGigs");
const createGigs = require("./api/createGigs");
const notification = require("./api/notification");
const bodyParser = require("body-parser");
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
// app.use("/products", products);
<<<<<<< HEAD
// app.use("/customers", customers);
app.use("/hosts", hosts);
app.use("/accounts", accounts);
app.use("/artists", artists);
app.use("/appliedGigs", appliedGigs);
app.use("/createGigs", createGigs);
app.use("/notification", notification);
=======
app.use("/hosts", hosts);
app.use("/accounts", accounts);
app.use("/artists", artists);
app.use("/", (req, res) => {
res.send("This is API demo");
});
>>>>>>> 418c701b7d3848094a0bed6bcc8d427c1918ddf1
app.listen(PORT, () => console.log(`App running on port ${PORT}`));