My bootstrap env for basic erlang webdevelopment. This is small scale stuff. It creates a mochiweb skeleton app. It uses rebar for building and dependancy management. The site is a basic site with ErlyDtl for templating and erlgmail for sending mail.
It is for that standard brochure site with contact form, but you can do what you like with it. There is nothing smart like url dispatching, have a look in <>/src/<>_web.erl for path handling.
I use Vagrant for development, you should too.
You will beed to have VirtualBox installed. Get 3.2.8 from Oracle here.
Then install Vagrant
gem install vagrant
To get the box, run
vagrant box add base http://files.vagrantup.com/lucid32.box
then clone this repo
git clone git://github.com/russelldb/mochstrap.git
then run (this will take AGES since it installs nginx, some dev libs, erlang (from source) and then the rebar_templates. Patience. Once it is done you don't need to do it again. You can even package the resulting box and use it as the base of future projects.)
cd /vagrant ./rebar create template=mochi appid=mywebapp nodeid=mywebapp email@example.com erlgmail_pass=yourpassword firstname.lastname@example.org
then ./rebar get-deps chmod +x start_dev.sh ./start_dev.sh
then point your browser at http://127.0.0.1:8080 and see your running erlang web dev bootstrap. Edit code in apps/mywebapp/src
edit templates and static content in
when you are happy
then package up the
directory and drop on your target linux host (like say slicehost)
see http://russelldb.github.com for a blog on all this.