Selim's posts

Created: Apr 8, 2017

Last updated: Apr 11, 2017

Hi all, I'm looking for volunteers to develop in NodeJS a framework to manage parameters for a "product". The parameters comes to an application in different way :

  1. Command line options (short and long : -h or --help)
  2. Environment variable
  3. In a parameter file (possibly YAML format).

Selim's comments

Apr 8, 2017 in Innovation project

The need is correctly described, but not the solution : You don't need to have the device in your mouth. It can be a device near your throat, like a nakelace or even it could be a mobile application.

Their is something not logical about it. Capturing your voice and repeat what you said faster will not gain any time as your attendees will have to wait at least the same time. You have to talk your speech.

What you really need is to increase your speed rate and make it more attractive than today.

For that I suggest simple solutions : * Try caffeine (a lot of) * Take some courses on debating and speech.

Hi kfwong,

Thank you for your answer. dotenv would help, but not solve the whole story. It takes config file variables into account, not pre-set environment variables nor command line options. Zixian, indeed, NodeJS can take command line parameters. I let you check the commander package.

What I would like is to built up a solution, maybe by combining dotenv and commander, that will take parameters, by decreasing priority order : - command line parameters - environment variables - config file values.

Exemple : Let say I have a nodeJS program that connects to a DB. If I want to have my DB_USER value as a parameter. I want to be able to : - get the DB_USER parameter from a config file, from the environment and from the command line parameters (-u, --user ) - if DB_USER is defined on each source, I will chose, by order of priority : * command line parameters * environment variables * config file values.