mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-06 02:49:56 +00:00
23 lines
475 B
TypeScript
23 lines
475 B
TypeScript
import express from 'express';
|
|
const app = express();
|
|
|
|
app.get('/api/users', (req, res) => {
|
|
res.json({ users: [] });
|
|
});
|
|
|
|
app.post('/api/users', (req, res) => {
|
|
res.json({ id: 1, created: true });
|
|
});
|
|
|
|
app.put('/api/users/:id', (req, res) => {
|
|
res.json({ updated: true });
|
|
});
|
|
|
|
app.delete('/api/users/:id', (req, res) => {
|
|
res.json({ deleted: true });
|
|
});
|
|
|
|
const router = express.Router();
|
|
router.get('/api/health', (req, res) => {
|
|
res.json({ status: 'ok' });
|
|
});
|