Closed deleteman closed 10 years ago
The resource will need a storage module, so we'll go with mongoose for now, but provide ability to add new generators using 3rd party modules.
The generator will probably need to generate:
Example syntax of the cli command:
$ vatican g books -a title:string description:string id:number likes:number
That will create the basic CRUD actions (with working code) for the books resource.
$ vatican g books -a title:string description:string id:number -m newBook:post searchBook:get updateBook:put likeBook:put
That will create 4 actions, and we can infer the action to be taken based on the name, so three of them can easily have code:
And "likeBook" might not be generic enough, so we'll just add the method without any code for the dev to fill.
Closing this, since it's been implemented on v1.3
The resource will need a storage module, so we'll go with mongoose for now, but provide ability to add new generators using 3rd party modules.
The generator will probably need to generate:
Example syntax of the cli command:
That will create the basic CRUD actions (with working code) for the books resource.
That will create 4 actions, and we can infer the action to be taken based on the name, so three of them can easily have code:
And "likeBook" might not be generic enough, so we'll just add the method without any code for the dev to fill.