Rebar provides rails generator like facility, and Rebar-Templates give Erlang developers more templates and workflow.
To make the templates available, you need to clone the repo to your
~/.rebar/templates
directory:
$ git clone git://github.com:jacktang/rebar-templates.git
$ ln -s /path/to/rebar-templates ~/.rebar/templates
$ ./rebar create template=project projectid=kickstart
$ cd kickstart
$ rebar create template=stdapp appid=<app_name>
$ rebar create template=gensrv srvid=<srv_name>
$ rebar create template=genfsm fmsid=<fsn_name>
$ rebar create template=genevent eventid=<event_name>
$ cd kickstart
$ rebar create template=cowboy_app appid=<app_name>
$ rebar create template=cowboy_handler handlerid=chat handlertype=websocket
$ rebar create template=wx_object widgetid=button_ext
$ rebar create template=test testmod=<module_name> test=ct
$ rebar create template=test testmod=<module_name> test=eunit
$ rebar create template=test testmod=<module_name> test=spec
Edit template_vars
in rebar.config and execute below command.
NOTE: rebar should be built from the branch
$ rebar create template=dev_console
Requirements: Erlang, Git
See more info on the service layout: