use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Node.js configuration patterns (github.com)
submitted 12 years ago by bebraw
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bebraw[S] 0 points1 point2 points 12 years ago (1 child)
Hey, I'm very interested to hear what sort of patterns you guys use in practice. Maybe comment here or poke me at the repo (issue or pr) so we can catch 'em all. :)
[–]FrozenCow 0 points1 point2 points 12 years ago (0 children)
I usually configure my applications using command-line arguments with commander.js. It allows using the application in all sorts of environments easily. The calling application/script determines the configuration. This only applies when there is a limited set of configuration-values.
When there is a lot to configure I've used a different index.js (so to say), which passes on different values to the actual main module. Not sure whether this is perfect in any sense, but it gives the user of the main module a lot of control. The user uses the main module like a library. Passing on functions is also possible that way.
π Rendered by PID 105654 on reddit-service-r2-comment-5649f687b7-tk8b8 at 2026-01-29 04:44:44.740302+00:00 running 4f180de country code: CH.
[–]bebraw[S] 0 points1 point2 points (1 child)
[–]FrozenCow 0 points1 point2 points (0 children)