UNPKG

express-api-cli

Version:

Cli tool for generating an express project. Instead of wasting extra time creating your project structure, start building right away

20 lines (16 loc) 341 B
import express from 'express'; const router = express.Router(); import userRoute from './user.route'; /** * Function contains Application routes * * @returns router */ const routes = () => { router.get('/', (req, res) => { res.json('Welcome'); }); router.use('/users', userRoute); return router; }; export default routes;