ericelliott/qconf

Is this still active?

Open

#16 geöffnet am 20. März 2018

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (5 Forks)github user discovery
help wanted

Repository-Metriken

Stars
 (44 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Hello world?

Hello there. You may ( or may not ) recognize me as one of the many people that likes following your blog and that recently got a hold on your JS book.

Yes yes, I know what you will say "the book is outdated and such" ( it is what you told me last time at least :P ), but I still read it anyway because I enjoyed it and because I think there are some pearls there that I can learn from.

Yeah yeah, so what do you want?

qconf was one of them. I have been battling on how to develop apps following the 12-factor app standard ( I won't bore you with the details ) and I need something simple to check files and ENV variables.

Problem

So I installed this library in my project, created a config.env file with the following json:

{
    "VAR_TEST": 1
}

and run the following code: var qconf = require("qconf"), config = qconf(["./config.env"]);

And it blew up:

TypeError: Parameter "url" must be a string, not undefined at Url.parse (url.js:81:11) at urlParse (url.js:75:5) at Object.loadSource (/home/service/testLogs/node_modules/qconf/lib/load-source.js:34:9) at /home/service/testLogs/node_modules/qconf/lib/process-dependencies.js:84:29 at Array.map (native) at processDependencies (/home/service/testLogs/node_modules/qconf/lib/process-dependencies.js:44:31) at configure (/home/service/testLogs/node_modules/qconf/qconf.js:59:7) at repl:1:40 at ContextifyScript.Script.runInThisContext (vm.js:23:33) at REPLServer.defaultEval (repl.js:339:29)

var qconf = require("qconf"), config = qconf(["file://config.env"]); TypeError: Parameter "url" must be a string, not undefined at Url.parse (url.js:81:11) at urlParse (url.js:75:5) at Object.loadSource (/home/service/testLogs/node_modules/qconf/lib/load-source.js:34:9) at /home/service/testLogs/node_modules/qconf/lib/process-dependencies.js:84:29 at Array.map (native) at processDependencies (/home/service/testLogs/node_modules/qconf/lib/process-dependencies.js:44:31) at configure (/home/service/testLogs/node_modules/qconf/qconf.js:59:7) at repl:1:40 at ContextifyScript.Script.runInThisContext (vm.js:23:33) at REPLServer.defaultEval (repl.js:339:29)

Questions, questions....

Now, I read the documentation at least 3 times but I couldn't find anything related to URLs nor any of the like. It could be that I am not using the library as I should, but if that's not the case and this is in fact an unexpected behavior, could I expect a fix?

Is this project still being maintained/alive?

If not, which similar projects would you recommend?

Contributor Guide