| const express = require('express'); |
| const path = require('path'); |
| const app = express(); |
| const PORT = process.env.PORT || 3000; |
|
|
| |
| app.use(express.static(path.join(__dirname, 'public'))); |
|
|
| |
| app.get('/api/dashboard', (req, res) => { |
| const timeframe = req.query.timeframe || '30d'; |
| const data = { |
| topCategories: [ |
| { name: 'AI Development', value: 32 }, |
| { name: 'Scientific Research', value: 24 }, |
| { name: 'Business Strategy', value: 18 }, |
| { name: 'Creative Arts', value: 12 }, |
| { name: 'Technical Solutions', value: 9 }, |
| { name: 'Other', value: 5 } |
| ], |
| revenueOpportunities: [ |
| { name: 'AI Consulting Services', value: 1200000 }, |
| { name: 'Premium API Access', value: 850000 }, |
| { name: 'Custom Model Training', value: 1800000 }, |
| { name: 'Enterprise Solutions', value: 2500000 } |
| ] |
| }; |
| res.json(data); |
| }); |
|
|
| |
| app.get('*', (req, res) => { |
| res.sendFile(path.join(__dirname, 'public', 'index.html')); |
| }); |
|
|
| app.listen(PORT, () => { |
| console.log(`Server running on port ${PORT}`); |
| }); |