Running Erlang Application on a Windows Server

I have an Erlang application that deploys on a server running Windows Server 2008.

How do i do this:

  • Copy the application folder to the Erlang lib directory.
  • Open a command prompt (cmd). Run erl .
  • Run the application: start (application_name) in the Erlang shell.

Are there any more efficient approaches to running the application? How to run the application when Windows starts?

+4
source share
3 answers

I have no experience with Windows, but ...

`1. First of all, you can take a look at the release concept in Erlang. Essentially

When we wrote one or more applications, we may need to create a complete system consisting of these applications and a subset of Erlang / OTP applications. This is called a release.

`2. Then you can create a script that contains something like:

erl -boot ch_rel-1 

If you essentially run Erlang / OTP using the boot script you created above (just follow the instructions on the releases page)

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

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

Hope this helps. Good question.

+4
source

Perhaps rebar might help. This makes creating an application skeleton and releasing it quite easy. Good tutorial here .

+1
source

After getting acquainted with the releases, look at the manual pages (erl -man) for start_erl and erlsrv. I used them to run the embedded system ( http://www.erlang.org/doc/embedded/embedded_nt.html ) on Windows 2003, hope it still works for you on Windows 2008. After creating the service using erlsrv you can manage it through standard Windows command line commands and GUI tools, for example. setting startup mode and rebooting.

Perhaps you could only launch your application by specifying "-s app_name" as an additional erl / start_erl flag, but I have not tried this since I had to go a long route with the embedded system. In this case, make sure you have "start () β†’ application: start (? MODULE)". in your "app_name.erl".

0
source

All Articles