Video Tutorial To Start Developing Web Applications on Erlang

Please find hereunder a video tutorial highlighting the key points of developing a JSON based web application with Erlang and Mochiweb.

Note that, for best performances (HD Definition), you have to directly go to the Vimeo website where the video is stored and watch it in full screen mode.

You may want to download the video. In that case, you will have to follow the instructions at the bottom of the video page on the Vimeo website.

Click on the image below to go the the video page.

Go to the video page

The purpose of all this, aside from arousing your curiosity, is to provide you with a getting started pack and allow you to go a step further in the Erlang web application sphere.

I invite you to download the example application (as illustrated in the video stickyNotes.zip) in order for you to understand all the pieces of the puzzle and to venture behind the scene.

Just keep in mind that stickyNotes is a one shot application that I’ve developed from scratch with the unique aim of illustrating the video example.

Having said that, any comment or suggestion is always welcome, especially about ‘struct.erl’, a module that I’ve created when I was learning the language in order to play with the tree structure resulting from the mochijson2 decode function.

We are using it in our mainstream development and I’m still wondering if I might have missed something important with regard to the Erlang distro or Mochiweb itself.

In order to install this stuff on your system and assuming that Erlang is properly setup on your box, just follow these steps:

1) Download stickyNotes and extract the archive in your home directory:

stickyNotes.zip

2) cd to stickyNotes dir and compile the code :

make clean && make

3) Start the application and initialize the db from the Erlang console (only once)

./start-dev.sh
stickydb:reset().

4) Browse the following address 127.0.0.1:8000

Super easy isn’t ?

Enjoy

How To Quickly Set Up Ubuntu 8.04 loaded with Erlang, Mochiweb and Nginx

Let’s say you want to give a try to Erlang (Discover our post about Why Erlang?) for your next web development project and you want to be up and running as quickly as possible… you just landed smoothly in the right place.

This post is the starting point of a series of posts in which I’m going to provide you with all the commands you’ll need to set up an Ubuntu 8.04 server loaded with Erlang, Mochiweb proxied by Nginx.

In the same series, I’ll also cover:

  • The basic configuration of Postfix (mail)
  • The use of Imagemagick to create dynamically a captcha for your application
  • The configuration of Bind9 in order to play with the url CNAME

The goal here is not to set up an hardened production server with all the optimizations and security niceties in head (I definitively want to avoid a ‘Why not Gentoo, or Slackware, or Debian, or FreeBSD, …?’, I love them all).

Continue reading