Search code examples
windowserlangwindows-server-2008erlang-otperlang-shell

Erlang application launch on a Windows server


I have an Erlang application that is deployed on a server with Windows Server 2008.

The way I do this:

  1. Copy application folder in Erlang lib directory.
  2. Open command line (cmd). Execute erl.
  3. Execute application:start(app_name) in Erlang shell.

Are there any better approaches to launch the application? How to make the application to launch on Windows startup?


Solution

  • I have no experience with Windows but...

    `1. First of all, you might want to have a look to the concept of release in Erlang. Essentially,

    When we have written one or more applications, we might want to create a complete system consisting of these applications and a subset of the Erlang/OTP applications. This is called a release.

    `2. Then, you might want to create a script that contains something like:

    erl -boot ch_rel-1
    

    Where essentially you're starting Erlang/OTP using a boot script that you created above (just follow the instructions in the releases page)

    `3. This article explains how to create startup scripts in Windows Server 2008 (not tested, just googled):

    http://technet.microsoft.com/en-us/magazine/dd630947.aspx

    Hope this helps. Nice question.