Initial commit: API Debug Tool
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
30
server/index.js
Normal file
30
server/index.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const express = require('express');
|
||||
const cors = require('cors');
|
||||
const bodyParser = require('body-parser');
|
||||
require('dotenv').config();
|
||||
|
||||
const tenantRoutes = require('./routes/tenants');
|
||||
const endpointRoutes = require('./routes/endpoints');
|
||||
const debugRoutes = require('./routes/debug');
|
||||
const authRoutes = require('./routes/auth');
|
||||
const settingsRoutes = require('./routes/settings');
|
||||
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 5001;
|
||||
|
||||
app.use(cors());
|
||||
app.use(bodyParser.json());
|
||||
|
||||
app.use('/api/auth', authRoutes);
|
||||
app.use('/api/tenants', tenantRoutes);
|
||||
app.use('/api/endpoints', endpointRoutes);
|
||||
app.use('/api/debug', debugRoutes);
|
||||
app.use('/api/settings', settingsRoutes);
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.send('API Debug Tool Backend is running...');
|
||||
});
|
||||
|
||||
app.listen(PORT, () => {
|
||||
process.stdout.write(`Server is running on port ${PORT}\n`);
|
||||
});
|
||||
Reference in New Issue
Block a user