Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Request: File Creation & Location. #176

Open
CodeMan99 opened this issue Jan 29, 2023 · 0 comments
Open

Documentation Request: File Creation & Location. #176

CodeMan99 opened this issue Jan 29, 2023 · 0 comments

Comments

@CodeMan99
Copy link

Questions

  • What causes the configuration file to be read?
  • What causes the configuration file to be written?
  • Where does the file exist?

Current Documentation

In my opinion, this sentence does not answer those questions.

All you have to care about is what to persist. This module will handle all the dull details like where and how.

Maybe that is intentional.

Experience

I just spent 2+ hours trying to understand when the file would be read. I found my answer by looking into the FAQ, which lead me to the env-paths module. Then I finally searched the source code, where I was able to identify my answers.

Answers Found

Suggestion One

Add details to the Conf constructor description. Maybe something like this?

Returns a new instance using the default values and file input. Will persist a default value if missing.

Suggestion Two

In the FAQ, find a way to suggest it's a good idea to keep configuration of your application in a single module. During development this pattern is useful for creating a default config by running node path/to/config-module.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant