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

Add ability to specify iisnode settings with a key-value config file #158

Closed
glennblock opened this issue May 2, 2012 · 5 comments
Closed

Comments

@glennblock
Copy link

Currently a node developer needs to understand web.config in order to tweak iisnode settings. This feature would allow specifying a simple config file within the iisnode element which would then specify all the iisnode settings.

The format would be a simple key-value store e.g.

nodeCommand : "node.exe mystartup.js"
loggingEnabled : true
debuggingEnabled : true
numberOfProcesses : 4

The config file would be specified in the iisnode element

@tjanczuk
Copy link
Owner

tjanczuk commented May 4, 2012

This is the design of the feature.

The iisnode@configOverride setting in web.config allows one to specify a file name of a configuration file with overrides of the settings in the <iisnode> section of web.config. The default value is node.config. The format of that file is a small subset of YAML:

  • comments start with # and continue through the end of the line,
  • configuration properties are specified as a simple <key>: <value> pair, one on each line,
  • blank lines are allowed,
  • all attributes of the <iisnode> element of web.config can be used as property names; case does not matter,
  • property names that are not recognized are ignored.

The file name specified in the iisnode@configOverride web.config setting must be present in the same directory as the node.js script that is the entry point of the node.js application. Typically one would have web.config, server.js, and node.config all in the same directory.

If the file specified in iisnode@configOverride is missing, settings from web.config remain effective, and no error is generated.

If the file specified in iisnode@configOverride is present but has a syntax error, an error is generated.

Changes to the file specified in iisnode@configOverride are detected and result in graceful recycling of the application as long as that file name is also specified as one of the files in the iisnode@watchedFiles configuration setting. By default iisnode@watchedFiles includes node.config.

YAML away!

@glennblock
Copy link
Author

Great work!

@bitcrazed
Copy link

Nice :)

@jbueza
Copy link

jbueza commented May 4, 2012

Great work @tjanczuk and @glennblock -- Looking forward to seeing this feature land.

Cheers,
Jaime

@tjanczuk
Copy link
Owner

The default name of the YAML config file was changed from node.config to iisnode.yml

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

4 participants