Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 587 Bytes

README.md

File metadata and controls

22 lines (19 loc) · 587 Bytes

Express / mongoose file structure generator

Usage

npm install -g janio  
janio user

or to skip installation phase

npx janio user

This will generate 4 files:

  • ./controllers/user.controller.js
  • ./routes/user.route.js
  • ./services/user.service.js
  • ./models/user.model.js

user.controller.js Will contain route logic and call services if necessary
user.route.js Will contain route definition, hooks and route rôle management
user.service.js Will contain specific logic ex: db access
user.model.js Will contain mongoose model definition