start erlang application from command line

LtWorf picture LtWorf · Apr 30, 2013 · Viewed 10.2k times · Source

I have an erlang application, compiled with rebar.

Normally I start it with like this:

application:start(myapp).

from inside the erl shell.

Could anyone tell me how to start it like a normal command line program?

Answer

Chris picture Chris · Apr 30, 2013

You can do:

erl -pa ebin -eval "application:start(myapp)"

If you want it to run in the background, add -noshell -detached