UNPKG

myex-cli

Version:

Opinionated Express.js framework with CLI tools

19 lines (17 loc) 575 B
import { authRoutes } from './auth.routes.js'; import { userRoutes } from './user.routes.js'; import { apiRoutes } from './api.routes.js'; /** * Configure all routes for the Express app * @param {import('express').Application} app - Express application */ export const configureRoutes = (app) => { // Health check endpoint app.get('/health', (req, res) => { res.status(200).json({ status: 'UP', timestamp: new Date() }); }); // Register route modules app.use('/api/auth', authRoutes); app.use('/api/users', userRoutes); app.use('/api', apiRoutes); };