We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Suppose I want to put some custom configurations in app.json or middleware.json. Currently I can use nconf to get them like this:
var nconf = require('nconf'); var sessionSettings = nconf.get('middleware:session');
But is there a better way to do this?
The text was updated successfully, but these errors were encountered:
Your configure handler will be passed the configuration loaded from the ./config directory.
configure
./config
Example:
var app = { configure: function (config, callback) { sessionSettings = config.get('middleware:session'); callback(); } };
See: lifecycle.
Sorry, something went wrong.
But how can I get the configuration from my controller?
Using nconf like you would in an express app. Here's a quick example to get you started: https://github.com/lmarkus/Kraken_Example_Configuration
Take a look at ./index.js for the general configuration and ./controllers/index.js for controller-based configuration.
./index.js
./controllers/index.js
I'll flesh out the Readme once we're back from the holiday break.
Merge pull request krakenjs#38 from ertoth/master
97c7b9b
Add port/socket messaging on startup.
No branches or pull requests
Suppose I want to put some custom configurations in app.json or middleware.json.
Currently I can use nconf to get them like this:
But is there a better way to do this?
The text was updated successfully, but these errors were encountered: