-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
58 lines (44 loc) · 1.79 KB
/
Copy pathserver.js
File metadata and controls
58 lines (44 loc) · 1.79 KB
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
const express = require('express');
const path = require('path');
const app = express();
const PORT = 3001;
app.use(express.static(path.join(__dirname, 'fitness')));
app.get('/index.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'index.html'));
});
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'home.html'))
});
app.get('/bmi_calculator.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'bmi_calculator.html'));
});
app.get('/diet_planner.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'diet_planner.html'));
});
app.get('/progress_tracker.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'progress_tracker.html'));
});
app.get('/home.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'home.html'));
});
app.get('/training_plan.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'training_plan.html'));
});
app.get('/calorie_calculator.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'calorie_calculator.html'));
});
app.get('/water_tracker.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'water_tracker.html'));
});
app.get('/team_management.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'team_management.html'));
});
app.get('/match_scheduler.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'match_scheduler.html'));
});
app.get('/player_performance.html', (req, res) => {
res.sendFile(path.join(__dirname, 'fitness', 'html', 'player_performance.html'));
});
app.listen(PORT, () => {
console.log(`Server running at http://localhost:${PORT}`);
});