Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Code generation for the hapijs framework. (work in progress)

Install it.

$ npm install hapi-scaffold -g

Initialize de application. Create the index.js with a basic config.

$ hapi-scaffold init

Erase all folders and files generated. Use it carefully.

$ hapi-scaffold destroy

Create the database configuration file.

$ hapi-scaffold generate db:mongo

Generate a default CRUD for the given resource name.

$ hapi-scaffold scaffold post title:string:required content:string rating:number

Generate a route file (and register it on the server).

$ hapi-scaffold scaffold route post

Generate a controller file.

$ hapi-scaffold scaffold controller post

Generate a service file. Here is where all the logic will be placed.

$ hapi-scaffold scaffold service post

Generate the model file.

$ hapi-scaffold scaffold model post title:string:required content:string rating:number

Remove the database configuration file.

$ hapi-scaffold remove db

Remove CRUD files.

$ hapi-scaffold remove post

Remove a route file (and unregister it on the server).

$ hapi-scaffold remove route post

Remove a controller file.

$ hapi-scaffold remove controller post

Remove a service file.

$ hapi-scaffold remove service post

Remove the model file.

$ hapi-scaffold remove model post

You can’t perform that action at this time.