0.3.0 • Published 7 years ago

generator-amur v0.3.0

Weekly downloads
10
License
MIT
Repository
github
Last release
7 years ago

Generator Amur

NPM version Build Status Dependency Status

Gimme a koa mongoose graphQL app

Setup an Amur Project

Assume that you have node.js and npm installed.

First, install Yeoman and Generator Amur.

npm install -g yo
npm install -g generator-amur

Then generate your new project:

yo amur my-new-app

If you don't specify app name, the app will be installed to your current working directory.

Generate Resources

Amur resource generator follows this style

yo amur:resource YourModelName field1:Type1 field2:Type2 ref1:RefType1 ref2:RefType2:foreignKey

Let's say you have a model named user, and user has a name, age and also a list of posts. And you have a model named post, it has title, content and author. Just type like this:

yo amur:resource User name:String age:Int posts:[Post]:author
yo amur:resource Post title:String content:String author:User

And then open npm start to try out auto generated API suite.

Destroy Resources

If you mistakenly generated something or you spell something wrongly, you want to undo:

yo amur:resource ResourceToDelete --destroy --force

License

MIT © Zhang Kaiyu

0.3.0

7 years ago

0.2.0

7 years ago

0.1.8

7 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago