Loading application variables

Pupeno pupeno@REDACTED
Sun Jun 11 14:51:02 CEST 2006


On Sun, 2006-06-11 at 13:39 +0100, Sean Hinde wrote:
> On 11 Jun 2006, at 13:06, Pupeno wrote:
> 
> > On Sun, 2006-06-11 at 14:02 +0200, Ulf Wiger wrote:
> >> I don't know if there's a standard function for loading  
> >> the .config file,
> >> but you can read and parse a .config file with
> >> file:consult("miselfu.config"), and you can set environment  
> >> variables with
> >> application:set_env(AppName, Key, Value).
> >
> > So, you don't normally work that way ? Opening up a shell on Emacs,
> > running the application and re-loading code as it is modified ?
> 
> I would think that most more serious erlang applications use the  
> sys.config file for a few parameters that are only required at  
> startup and not subject to change. Parameters that should change at  
> runtime would typically be stored in a database or opened up as APIs  
> so they can be changed without restarting the application.
> 
> Of course your application might be such that it can be restarted  
> after every config change, in which case sys.config might be sufficient.

So far, these configurations, are port numbers. You have to interrupt
the service anyway to change the port you offer the service on. Although
I may store them on a DB latter, right now I only want to be able to run
the app from erl.
-- 
Pupeno <pupeno@REDACTED> http://pupeno.com
-------------- 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/3724170e/attachment.bin>


More information about the erlang-questions mailing list