https://github.com/wsw0108/edan
Expose options passed to app as `appInfo.options` and `app.config.appOptions`
https://github.com/wsw0108/edan
egg egg-framework
Last synced: 4 months ago
JSON representation
Expose options passed to app as `appInfo.options` and `app.config.appOptions`
- Host: GitHub
- URL: https://github.com/wsw0108/edan
- Owner: wsw0108
- License: mit
- Created: 2017-03-23T08:32:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-27T09:33:16.000Z (about 8 years ago)
- Last Synced: 2025-06-24T14:11:30.629Z (8 months ago)
- Topics: egg, egg-framework
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# edan
Expose options passed to app as `appInfo.options` and `app.config.appOptions`.
## Usage
you can use options passed to an app like below:
```
// config/config.${env}.js
module.exports = appInfo => {
const config = {};
config.something = appInfo.options.something;
return config;
}
```
or
```
// app.js
module.exports = app => {
console.log(app.config.appOptions);
}
```
## License
[MIT](LICENSE)