express-routes-generator-cli
command line interface of express-routes-generator
installation
- npm i express-routes-generator-cli --save
- yarn add express-routes-generator-cli
usage:
from console: .\node_modules.bin\express-routes-generator-cli build product
script define
usage:
from console: npm run crud build product
generate files crud routes and build structure directories , build too an file all-routes.js with e.g:
const Product = ;const Article = ; moduleexports =/** * @class Routes * @classdesc implement all routes */class { app ; app ; } ;
for implements all routes with one call
server.js
const express = app = Routes = ; app ; // implements route
for reset data build all-routes.js use:
npm run crud reset