Ok, ok...
I agree with that, I also hate some of those details!

But then:
1) I found far too many modules for YAML, any recomendations?
2) is there a built-in version? I found some confusing comments about that
3) It apears that YAML *can* be more complex than JSON, where can I get some examples of simple (and not so simple) config files with YAML?

Thanks,

Alain
=== Minha MesaXYZ: <http://mesa-reprap.blogspot.com.br/> ===

Em 28-12-2013 16:55, Alex Kocharin escreveu:
1. you can't store comments there, it is mandatory feature for every config file 2. you can't use trailing comma, so it's awful for line-based version control 3. double quotes... unquoted keys... oh come on, it's unreadable (still better than xml though)
4. ...
5. ... seriously, I can write several pages about what is wrong with JSON if you want Even npm does not use it for storing config. It uses .ini format instead. Guess why.
28.12.2013, 22:19, "Alain Mouette" <amlista...@fastmail.fm>:
Could you please explain why?
It really seems to be the simplest method, used inclusive by npn itselt...

Alain
=== Minha MesaXYZ:<http://mesa-reprap.blogspot.com.br/>  
<http://mesa-reprap.blogspot.com.br/>  ===
Em 28-12-2013 13:57, Alex Kocharin escreveu:
Every time you write config file using JSON format, God kills a kitten.
Seriously, stop that. This is what YAML is for.
28.12.2013, 03:33, "Austin William Wright" <diamondma...@users.sourceforge.net> <mailto:diamondma...@users.sourceforge.net>:
Just use a configuration file, it can be as easy as require()ing a JSON file:
var config = require('./config.json');
var db = database.connect(config.host, config.user, config.password);
Then add an config.example.json to your repo, and add config.json to your .gitignore. You may also wish to read the configuration file location out of an environment variable, or your command line arguments:
var configFilename = process.env.NODE_CONF || 'config.json';
var config = JSON.parse(fs.readFileSync(configFilename, 'utf8'));
/* etc */
Cheers,
Austin Wright.

On Friday, December 27, 2013 8:31:54 AM UTC-7, Reginald Choudari wrote:

    Hello, this morning I was pondering on a good way to store
    passwords server-side to be used by a Node app. I would like to
    publish the app's code on GitHub but obviously would not want
    to publish my passwords ...

    One method I have seen before was to add passwords to the
    environment vars in the server's local .bash_profile, and then
    have the Node app access these env vars in the code. Could this
    be a sufficient (and secure) way?

    Thanks,
    Reginald

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com <mailto:nodejs@googlegroups.com>
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com <mailto:nodejs+unsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com <mailto:nodejs+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com <mailto:nodejs@googlegroups.com>
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com <mailto:nodejs+unsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com <mailto:nodejs+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com <mailto:nodejs@googlegroups.com>
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com <mailto:nodejs+unsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com <mailto:nodejs+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to