| | 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: 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); |
| | }); |
| |
|
| | |
| | app.get('*', (req, res) => { |
| | res.sendFile(path.join(__dirname, 'public', 'index.html')); |
| | }); |
| |
|
| | app.listen(PORT, () => { |
| | console.log(`Server running on port ${PORT}`); |
| | }); |