File size: 1,217 Bytes
bbc658a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
const express = require('express');
const path = require('path');
const app = express();
const PORT = process.env.PORT || 3000;

// Serve static files
app.use(express.static(path.join(__dirname, 'public')));

// API endpoints for dashboard data
app.get('/api/dashboard', (req, res) => {
    const timeframe = req.query.timeframe || '30d';
    const data = {
        topCategories: [
            { name: 'AI Development', value: 38 },
            { name: 'Scientific Research', value: 28 },
            { name: 'Business Strategy', value: 15 },
            { name: 'Creative Arts', value: 10 },
            { name: 'Technical Solutions', value: 7 },
            { name: 'Other', value: 2 }
        ],
        revenueOpportunities: [
            { name: 'AI Consulting Services', value: 1850000 },
            { name: 'Premium API Access', value: 1200000 },
            { name: 'Custom Model Training', value: 2200000 },
            { name: 'Enterprise Solutions', value: 3100000 }
        ]
};
    res.json(data);
});

// Handle SPA routing
app.get('*', (req, res) => {
    res.sendFile(path.join(__dirname, 'public', 'index.html'));
});

app.listen(PORT, () => {
    console.log(`Server running on port ${PORT}`);
});