I was thinking one of the following:
1) command line flag to "shell" command on sinan to trigger an automatic 
execution
2) separate sinan command to trigger automatic execution (within the 
running shell)
3) something inserted in the sinan tutorial that references the file in 
an examples directory or somehow makes the code available to be used 
separate from the sinan project

I wasn't really expecting that this method would be used for normal 
execution of a project (execution of the main application after 
deployment) but just for development and testing.  I just wanted a quick 
and easy way to startup the project without dealing with dependencies 
directly.  It just seemed easier than a hard-coded solution I found 
elsewhere.

Eric Merritt wrote:
> Michael,
>
>
>  What are you thinking. Just some additional docs?
>
> On Wed, Dec 10, 2008 at 1:45 AM, Michael Truog <[email protected]> wrote:
>   
>> I think some code might be useful in the documentation or perhaps
>> somehow inserted into sinan for simple testing of the project.  The code
>> allows a simple way to start the application and test it when using the
>> sinan shell command.  The code is below:
>>
>> %%% provide a way for start a sinan application when using the shell
>> interface
>> %%% (useful for development and testing)
>> %%%
>> %%% sinan --prefix=/path/to/erlang/ shell
>> %%% > bootstrap:start(main_application_name).
>> %%%
>> -module(bootstrap).
>> -export([start/1, stop/1]).
>>
>> start(Project) ->
>>  % extra process information
>>  application:start(sasl),
>>
>>  application:load(Project),
>>  {ok, Dependencies} = application:get_key(Project, applications),
>>  start_all(Dependencies, Project).
>>
>> stop(Project) ->
>>  application:stop(Project).
>>
>> start_all([H | T], Project) ->
>>  application:start(H),
>>  start_all(T, Project);
>> start_all([], Project) ->
>>  application:start(Project).
>>
>>     
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlware-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/erlware-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to