Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Dmitry Polyanovsky edited this page · 21 revisions

Step 1. Install Erlang

  • (e.g. from - CB requires R16B or better to compile, though Chicago Boss does not work with Erlang R16B03 due to an error in erl_syntax)
  • Using kerl Please read kerl documents for easy setup and maintenance

Step 2. Download Chicago Boss and extract the archive.

Step 3. Get these to a terminal

cd ChicagoBoss
# if you downloaded from GitHub...
./rebar get-deps 
./rebar compile
# if you downloaded from
make # actually this just runs the ./rebar commands above

make app PROJECT=rahm
cd ../rahm

Step 4. Write an application. Put this into src/controller/rahm_greeting_controller.erl:

-module(rahm_greeting_controller, [Req]).

hello('GET', []) ->
    {output, "<strong>Rahm says hello!</strong>"}.

Step 5. Start the development server


Step 6. Try it out in a web browser: http://localhost:8001/greeting/hello

Step 7. Stop the development server


Step 8. Write a conformance test. Put this into src/test/functional/rahm_test.erl: (you will need a copy of boss.config named boss.test.config and reference a database for testing in this config file if you like)


start() ->
    boss_web_test:get_request("/greeting/hello", [],
        [ fun boss_assert:http_ok/1,
            fun(Res) -> boss_assert:tag_with_text("strong", 
                "Rahm says hello!", Res) end ], []).

Step 9. Build for production and run the conformance test

./rebar compile
./rebar boss c=test_functional

Step 10. There is no step 10!

Just kidding, you need to start the production server.

./ start

And if you need to stop it:

./ stop

Now ask all your friends to visit your web page and try to get Rahm to stop saying hello.

It simply can't be done!

Furthermore, you can hot code reload by performing two and a half simple extra steps:

0.5) Upload new the code
1) ./rebar compile
2) ./ reload
Something went wrong with that request. Please try again.