https://github.com/co2-git/pronto-config
Expose a JSON object in `app.locals.config`
https://github.com/co2-git/pronto-config
Last synced: 11 months ago
JSON representation
Expose a JSON object in `app.locals.config`
- Host: GitHub
- URL: https://github.com/co2-git/pronto-config
- Owner: co2-git
- Created: 2014-08-13T13:23:33.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-17T10:07:15.000Z (almost 12 years ago)
- Last Synced: 2025-02-01T16:23:19.284Z (over 1 year ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
prontoplugin-config
===================
Expose a JSON object in `app.locals.config`
# Install
pronto plugins install config
# Usage
```js
// In pronto
pronto()
.plugin('pronto-config', { foo: 'bar' })
.on('all').then(function (req, res) {
res.send(app.locals.foo);
});
// In Express
var prontoConfig = require('pronto-config');
var app = express();
prontoConfig(app, { foo: 'bar' });
app.use(function(req, res) {
res.send(app.locals.foo);
});
```
# Merge
You can pass more than one argument
```js
pronto().plugin('pronto-config', { foo: 'bar' }, { bar: 'foo '});
```