Loading application variables

Pupeno pupeno@REDACTED
Sun Jun 11 12:30:24 CEST 2006


Hello,
I have written an Erlang application called MiSelfu (well, miselfu
actually). I can start it from the command line with:

erl -sname miselfu -boot miselfu
-config /usr/local/etc/miselfu/miselfu.config

but I'd like to be able to start it from a already-running emulator,
that's so I can run it from within my shell running within Emacs.
I can try:

> application:start(miselfu).

=INFO REPORT==== 11-Jun-2006::12:04:35 ===
    application: miselfu
    exited: {shutdown,{miselfu_app,start,[normal,[]]}}
    type: temporary
{error,{shutdown,{miselfu_app,start,[normal,[]]}}}
>

but as you can see, I get a non-very descriptive error (at least, for my
eyes). I only can think of the missing config file as the problem. How
do I load that config file[1] to be able to run my application ?
Am I doing something wrong ?
As a newbie to Erlang and not knowing anyone else using it (I have never
seen anyone else codding on Erlang), I am not sure about the best way to
go thru the development cicle.
Thank you.
-- 
Pupeno <pupeno@REDACTED> http://pupeno.com

[1] The config file contais:

%% Configuration file for MiSelfu.

[{miselfu,
  [
   %% Ports for the different processes.
   {echoTCPPort, 7},
   {echoUDPPort, 7},
   {chargenTCPPort, 19},
   {chargenUDPPort, 19},
   {daytimeTCPPort, 13},
   {daytimeUDPPort, 13},
   {timeTCPPort, 37},
   {timeUDPPort, 37},

   %% Offset, it will be added to all the ports.
   {portOffset, 0}]}].
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060611/70d4ac13/attachment.bin>


More information about the erlang-questions mailing list