-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
31 lines (27 loc) · 1.11 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
24
25
26
27
28
29
30
31
const express = require("express");
const app = express();
const bodyParser = require("body-parser");
require("express-async-errors");
require("dotenv").config();
// const users = require("./routes/users");
const clients = require("./routes/clients");
const app_diary = require("./routes/appointment_diary");
const cleaner = require("./routes/cleaner");
const verify = require("./routes/processes/verify_mflcode");
const todaysAppointments = require("./routes/processes/process_today_appointment");
const pastAppointments = require("./routes/processes/process_past_appointment");
const sender = require("./routes/processes/sender");
// app.use(express.json());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use("/clients", clients);
app.use("/cleaner", cleaner);
app.use("/sender", sender);
app.use("/receiver", app_diary);
app.use("/verifyMFLCode", verify);
app.use("/today_appointments", todaysAppointments);
app.use("/past_appointments", pastAppointments);
const PORT = process.env.PORT || 3000;
app.listen(PORT, () =>
console.log(`Ushauri Web App started. Listening on Port: ${PORT}`)
);