UNPKG

js-mvc-app

Version:

A CLI tool to scaffold complete Node.js MVC projects with TypeScript, just like Laravel

46 lines (42 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getIndexRoutes = getIndexRoutes; function getIndexRoutes() { return `import { Router, Request, Response } from 'express'; const router = Router(); // Home route router.get('/', (req: Request, res: Response) => { res.json({ message: 'Welcome to Node.js MVC API', version: '1.0.0', timestamp: new Date().toISOString() }); }); // API information router.get('/api', (req: Request, res: Response) => { res.json({ message: 'Node.js MVC API', version: '1.0.0', endpoints: { auth: { register: 'POST /api/auth/register', login: 'POST /api/auth/login', profile: 'GET /api/auth/profile', updateProfile: 'PUT /api/auth/profile', changePassword: 'PUT /api/auth/change-password' }, users: { getAll: 'GET /api/users', getById: 'GET /api/users/:id', update: 'PUT /api/users/:id', delete: 'DELETE /api/users/:id', search: 'GET /api/users/search?q=query' }, health: 'GET /health' } }); }); export default router; `; } //# sourceMappingURL=index.js.map