feat: bootstrap backend API, schema and forgejo task issues
This commit is contained in:
parent
77e837cc25
commit
09ea388190
15 changed files with 1557 additions and 0 deletions
23
backend/src/server.js
Normal file
23
backend/src/server.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import express from 'express';
|
||||
import dotenv from 'dotenv';
|
||||
import authRoutes from './routes/auth.js';
|
||||
import helpRequestRoutes from './routes/helpRequests.js';
|
||||
import offerRoutes from './routes/offers.js';
|
||||
import reviewRoutes from './routes/reviews.js';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
app.use(express.json());
|
||||
|
||||
app.get('/health', (_req, res) => res.json({ status: 'ok' }));
|
||||
|
||||
app.use('/auth', authRoutes);
|
||||
app.use('/requests', helpRequestRoutes);
|
||||
app.use('/offers', offerRoutes);
|
||||
app.use('/reviews', reviewRoutes);
|
||||
|
||||
const port = Number(process.env.PORT || 3000);
|
||||
app.listen(port, () => {
|
||||
console.log(`helpyourneighbour backend listening on ${port}`);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue