Live data from Hacker News

Node.js: Be a good dev: offer dependencies

medium.com

21–22 of 22 posts

Re: Node.js: Be a good dev: offer dependencies

#21
post #2

Isn't that the whole reason there is a package.json? That way, people just run npm install and already have all the necessary dependencies.

Yes, a package.json is good to get the required dependencies. This article is about possible dependencies that help in cases where you all the possible would mean a huge load on the system.

How is it a huge load on the system given that node can lazy load modules? Do you mean disk space?

Re: Node.js: Be a good dev: offer dependencies

#22
post #10

Earlier quoted context omitted.

Use js files for config. They support comments, syntax highlighting will work out of the box, and you can require them.

A problem that I have with my article is that readers seem to get hung up on the config loading bits when I tried to use it as an example for a more-general problem. To fix this I added a section to the article: https://t.co/sXJhTYXQvy (Using executable files for configuration can be an enormous problem for some uses.)

I think it's a poor example. I don't want to choose between 20 different config file formats. Give me a config file in a format I know.
Post reply on HN