Hello, exposing the code on Github would be disastrous. I've seen both
well-known clients and people I personally know make this error. Here are
the recommendations I give to avoid this potential:
1. Yes, please add config.yaml (or however you choose to store config) to
your gitignore.
2.
.env files are also used by process management tools like node-foreman,
https://npmjs.org/package/foreman
-- Daniel R. dani...@neophi.com [http://danielr.neophi.com/]
On Fri, Dec 27, 2013 at 11:24 PM, Tim Walling tim.wall...@gmail.com wrote:
Store them in environment variables and use
Interesting! This is what wordpress doess basically, right?
--
--
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
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:Just use a configuration file, it can be as easy as require()ing a JSON file: var config =
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/ ===
Em 28-12-2013 13:57, Alex Kocharin escreveu:
Every time you write config file using JSON format, God kills a kitten.
1. you can't store comments there, it is mandatory feature for every config file2. you can't use trailing comma, so it's awful for line-based version control3. double quotes... unquoted keys... oh come on, it's unreadable (still better than xml though)4. ...5. ... seriously, I can write several
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
1. As far as I know, there is only one module for YAML - "js-yaml". Others unfortunately are incomplete.2. No. Node.js core is just a core, and it's pretty much useless without modules.3. Well... here is one: https://github.com/rlidwka/sinopia/blob/master/package.yaml If you still think it's too
I suggest JSON because it's easy, and the use-case here is only likely to
need a handful of configuration entries. But perhaps environment variables
already do this.
YAML is definitely better suited for configuration file formats, especially
more complex situations like defining HTTPS/TLS
29.12.2013, 02:07, "Austin William Wright" diamondma...@users.sourceforge.net:I suggest JSON because it's easy, and the use-case here is only likely to need a handful of configuration entries. But perhaps environment variables already do this. It always starts simple and easy. After that you add
Here is the flowchart I just made. Missing a few points, but basic idea is the same: https://f.cloud.github.com/assets/999113/1818638/05a6d636-7015-11e3-98e1-44350fb0d315.png If you don't want to have any dependencies, simple _javascript_ file will do the job. 29.12.2013, 02:07, "Austin William
Thanks, that is really a good example.
JSON5 also seems very nice :)
Alain
=== Minha MesaXYZ: http://mesa-reprap.blogspot.com.br/ ===
Em 28-12-2013 18:33, Alex Kocharin escreveu:
1. As far as I know, there is only one module for YAML - js-yaml.
Others unfortunately are incomplete.
2. No.
On Saturday, December 28, 2013 3:19:43 PM UTC-7, Alex Kocharin wrote:
29.12.2013, 02:07, Austin William Wright
diamon...@users.sourceforge.net javascript::
I suggest JSON because it's easy, and the use-case here is only likely to
need a handful of configuration entries. But perhaps
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
Store them in environment variables and use something like dotenv
(https://npmjs.org/package/dotenv) to load them in your application.
On Friday, December 27, 2013 10:31:54 AM UTC-5, Reginald Choudari wrote:
Hello, this morning I was pondering on a good way to store passwords
server-side to
15 matches
Mail list logo