Dynamicly generated websites in Erlang

Torbjorn Tornkvist tobbe@REDACTED
Tue Mar 27 10:34:08 CEST 2001


> > Start Erlang with the switches: -config /...../xxx/inets -s my
> 
> I do and get this error
> {'init terminating in do_boot',{undef,[{my,start,[]},{init,start_it,1},{init,start_em,1}]}}
> init terminating in do_boot ()

Try and add the path to your erlang module:

erl -config /...../xxx/inets -pa /where/my-code/is -s my

> Btw, is it normal to get like 4-5 PROGRESS REPORTs when startin
> inets?

Yes, especially if you are using the: -boot start_sasl
switch.

> > In your startup code in my.erl, call:  application:start(inets)
>
> I'm not sure waht you mean by startup code.

In my.erl you probably have something like:

start() ->
        spawn(?MODULE, init, []).

init() ->
        application:start(inets),
        %% more init stuff here... ?
        loop().

loop() ->
        %% A receive-loop here....
        receive
          Msg ->
            io:format("loop got: ~p~n",[Msg]),
            loop()
        end.


Cheers /Tobbe





More information about the erlang-questions mailing list