-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
66 lines (44 loc) · 1.78 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const express = require("express");
const app = express();
const cors = require("cors");
app.use(express.json());
app.use(cors());
//ADMIN ROUTES///////////////////////////////////////////////////////////
//register and login
app.use("/admin/smartride", require("./routes/admin/smartride"));
//dashboard
app.use("/admin/dashboard", require("./routes/admin/dashboard"));
//crud for busses
app.use("/admin/busses", require("./routes/admin/busses"));
// crud for routes
app.use("/admin/halts", require("./routes/admin/halts"));
// crud for fares
app.use("/admin/fares", require("./routes/admin/fares"));
// crud for routes
app.use("/admin/conductors", require("./routes/admin/conductors"));
//stat
//stat
app.use("/admin/stat", require("./routes/admin/stat"));
//CONDUCTOR ROUTES////////////////////////////////////////////////////////
//register and login
app.use("/conductor/smartride", require("./routes/conductor/smartride"));
//stat module
app.use("/conductor/stat", require("./routes/conductor/stat"));
//passengerlist
app.use("/conductor/passengerlist", require('./routes/conductor/passengerlist'));
//PASSENEGR ROUTES////////////////////////////////////////////////////////
//register and login
app.use("/passenger/add", require('./routes/passenger/passenger'));
//login
//app.use("/passenger/login", require('./routes/passenger/passenger'));
//fare rates
app.use("/passenger/fare", require('./routes/passenger/fareRate'));
//past travels
app.use("/passenger/pasttravels", require('./routes/passenger/pastTravel'));
//bus locations
app.use("/passenger/buslocations", require('./routes/passenger/busLocations'));
//ongoin map
app.use("/passenger/ongoingmap", require('./routes/passenger/ongoingmap'));
app.listen(5000, () => {
console.log("server is running on port 5000");
});