-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
33 lines (21 loc) · 807 Bytes
/
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
const express = require('express')
const tokenController = require('./controllers/tokenController');
const fillTextFieldController = require('./controllers/fillTextFieldController');
const patientDataController = require('./controllers/patientDataController');
const app = express()
// Set EJS as the view engine
app.set('view engine', 'ejs');
app.set('views', 'views');
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
const port = 3000
app.use(express.static('public'));
app.get('/', (req, res) => {
res.render('index', {patientId: ''});
});
app.use('/startSession', tokenController);
app.use('/create-record/get', fillTextFieldController);
app.use('/patient-data', patientDataController);
app.listen(port, () => {
console.log(`app listening on port ${port}`)
})