generator-hiroki

Generate Rest api using hiroki


Keywords
rest, api, mongoose, express, hiroki, yeoman-generator, yeoman
License
MIT
Install
npm install generator-hiroki@0.2.3

Documentation

generator-hiroki NPM version Build Status Dependency Status

Generate Rest api using hiroki

Installation

First, install Yeoman and generator-hiroki using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-hiroki

Then generate your new project:

yo hiroki

Generate model

Also you can generate a new model in proyect:

yo hiroki:model

Generate decorator

yo hiroki:decorator

About the structure

  • The logic of your application should be contained in these folders:
lib/
β”œβ”€β”€ decorators
β”‚Β Β  β”œβ”€β”€ index.js
β”‚Β Β  └── user.js
β”œβ”€β”€ logger.js
β”œβ”€β”€ models
β”‚Β Β  β”œβ”€β”€ index.js
β”‚Β Β  └── user.js
└── routes
    β”œβ”€β”€ auth.js
    β”œβ”€β”€ extract-jwt.js
    β”œβ”€β”€ home.js
    β”œβ”€β”€ index.js
    └── users.js
  • configuration:
config/
└── public.js
.env

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

Hiroki Documentation

Documentation here

License

MIT Β© percho