-
-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathdashboard-server.js
More file actions
26 lines (19 loc) · 664 Bytes
/
dashboard-server.js
File metadata and controls
26 lines (19 loc) · 664 Bytes
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
const express = require('express');
const path = require('path');
const app = express();
// Serve static files from dashboard directory
app.use(express.static(path.join(__dirname, '../dashboard')));
// Serve index.html for root
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, '../dashboard/login.html'));
});
app.get('/dashboard', (req, res) => {
res.sendFile(path.join(__dirname, '../dashboard/index.html'));
});
app.get('/pricing', (req, res) => {
res.sendFile(path.join(__dirname, '../dashboard/pricing.html'));
});
const PORT = 3000;
app.listen(PORT, () => {
console.log(`🎨 Dashboard running at http://localhost:${PORT}`);
});