Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Austin William Wright
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 >: > > I suggest JSON because it's easy, and the use-case here is only likely to > need a handful of configuration entries. But perhaps env

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Alain Mouette
Thanks, that is really a good example. JSON5 also seems very nice :) Alain === Minha MesaXYZ: === 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. N

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Alex Kocharin
 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 W

Re: [nodejs] Anonymous Function Return Value

2013-12-28 Thread Mark Hahn
Waiting until a file is closed is not easy. Google it. On Sat, Dec 28, 2013 at 2:51 PM, Matthew Hazlett wrote: > I want to share my idea for an execSync tailored to this issue. > > The commands it execs usually are less then 1 second long (run time). > > >

Re: [nodejs] Anonymous Function Return Value

2013-12-28 Thread Matthew Hazlett
I want to share my idea for an execSync tailored to this issue. The commands it execs usually are less then 1 second long (run time). Doing it this way, I think I will be able to get the

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Alex Kocharin
 29.12.2013, 02:07, "Austin William Wright" :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 port, module path, more and more en

Re: [nodejs] Anonymous Function Return Value

2013-12-28 Thread Alex Kocharin
 Use "fibers" module then. But you'd better be sure what you're doing, because it's not how node.js is supposed to work.  29.12.2013, 01:50, "Matthew Hazlett" :I had this idea as well, to make an overloaded function of sorts and call it again after the results are in.  But this wouldn't really help

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Austin William Wright
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 certi

Re: [nodejs] Anonymous Function Return Value

2013-12-28 Thread Matthew Hazlett
I found this, looks promising: https://github.com/jeremyfa/node-exec-sync I had an idea how I can do it with flat files, but I'm going to look at this first.l -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You

Re: [nodejs] Anonymous Function Return Value

2013-12-28 Thread Matthew Hazlett
I had this idea as well, to make an overloaded function of sorts and call it again after the results are in. But this wouldn't really help me, as the goal is to sent the output to the caller of the function that executed the process not to the.function that actually executed the process. -

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Alex Kocharin
 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 c

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Alain Mouette
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

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Alex Kocharin
 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 pa

[nodejs] How to attach nodeJS source in nodeclipse

2013-12-28 Thread pushpinder rattan
Folks, I have installed nodeclipse in my MAC OSx and it is working perfectly. I was just wondering if there is any way of atttaching nodeJS source to my Node project created in eclipse like we do for Java ones? Please help . thanks Pushpinder -- -- Job Board: http://jobs.nodejs.org/ Posting gu

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Alain Mouette
Could you please explain why? It really seems to be the simplest method, used inclusive by npn itselt... Alain === Minha MesaXYZ: === Em 28-12-2013 13:57, Alex Kocharin escreveu: Every time you write config file using JSON format, God kills a kitten. Seriou

Re: [nodejs] Anonymous Function Return Value

2013-12-28 Thread Alex Kocharin
There is no way to synchronously return a value captured by an asynchronous function. Only thing you can do is to change a signature of your function to `function (ProviderCommand, callback)` and call `callback(...)` at the end of the execution chain. (not mentioning coroutines and promises w

Re: [nodejs] Anonymous Function Return Value

2013-12-28 Thread Matt
That would require an `execSync` which Node doesn't have (yet). You have to do it as a callback. On Sat, Dec 28, 2013 at 11:08 AM, hazl...@gmail.com wrote: > I have a 'require('child_process').exec' call that gives an anonymous > function to capture its output. What I need to do is return this

[nodejs] Anonymous Function Return Value

2013-12-28 Thread hazl...@gmail.com
I have a 'require('child_process').exec' call that gives an anonymous function to capture its output. What I need to do is return this output to the calling function. Visually Explained: function -> function that Executes Child -> Anonymous Function -> Return o

Re: [nodejs] Re: npm install -g karma does not install executable

2013-12-28 Thread Alex Kocharin
 No, it's not:https://github.com/karma-runner/karma/blob/master/package.json#L163 You probably installed an old version of it.  28.12.2013, 09:22, "Dmitri Zaitsev" :Guess what? Run installation again and suddenly it is there!Glad it was fixed.On Friday, December 27, 2013 1:32:39 PM UTC, Alex Kochar

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Alex Kocharin
 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" :Just use a configuration file, it can be as easy as require()ing a JSON file: var config = require('./config.json');var db = database

[nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Filipe Deschamps
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

Re: [nodejs] Re: Good way to store passwords server-side for node apps

2013-12-28 Thread Daniel Rinehart
.env files are also used by process management tools like node-foreman, https://npmjs.org/package/foreman -- Daniel R. [http://danielr.neophi.com/] On Fri, Dec 27, 2013 at 11:24 PM, Tim Walling wrote: > Store them in environment variables and use something like dotenv ( > https://npmjs.org/p