-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
28 lines (22 loc) · 778 Bytes
/
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
const express = require('express');
const path = require('path');
const app = express();
const port = 3000;
app.use(express.static('public'));
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'router.html'));
});
// Adding routes for borrower, guarantee, and lender
app.get('/borrower', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'borrower.html'));
});
app.get('/guarantee', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'guarantee.html'));
});
app.get('/lender', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'lender.html'));
});
app.listen(port, () => {
console.log(`Example app listening on port ${port}`);
console.log(`Example app running on http://localhost:${port}/`);
});