-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
46 lines (40 loc) · 1.58 KB
/
app.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
const mysql = require('mysql2');
const express = require('express');
const bodyParser = require('body-parser');
const frontendport = 52117;
const app = express();
const cors=require('cors');
app.use(cors());
//bodyParser is included implicitly in express
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
//Routers
signupRouter = require('./routes/signup');
loginRouter = require('./routes/login');
patientDashboardRouter = require('./routes/dashboard');
doctorDashboardRouter = require('./routes/doctorDashboard');
checkMedicineRouter = require('./routes/checkMedicines');
paymentRouter = require('./routes/payments');
patientProfileRouter = require('./routes/patientProfile');
doctorProfileRouter = require('./routes/doctorProfile');
passwordChangeRouter = require('./routes/passwordChange');
verifypayment = require('./routes/verifypayment');
userAccounts = require('./routes/useraccounts');
reserveAppointments = require('./routes/reserveAppointments');
//Routes
app.use('/signup', signupRouter);
app.use('/login', loginRouter);
app.use('/dashboard', patientDashboardRouter);
app.use('/doctordashboard', doctorDashboardRouter);
app.use('/checkmedicine', checkMedicineRouter);
app.use('/payments', paymentRouter);
app.use('/patientprofile', patientProfileRouter);
app.use('/doctorprofile', doctorProfileRouter);
app.use('/passwordchange', passwordChangeRouter);
app.use('/verifypayment', verifypayment);
app.use('/useraccounts', userAccounts);
app.use('/reserve', reserveAppointments);
app.listen(frontendport, () => {
console.log("port 52117 accessed")
})
module.exports = app;