Run erlang application from command line

I have an erlang application compiled with armature.

I usually run it like this:

application:start(myapp). 

from inside the erl shell.

Can someone tell me how to run it like a regular command line program?

+7
source share
2 answers

You can do:

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

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

+14
source

Create a shell script, something like this:

 exec erl -pa ebin/ deps/*/ebin -s myapp 

For other options you need, see http://www.erlang.org/doc/man/erl.html .

+5
source

All Articles