An open API service indexing awesome lists of open source software.

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`

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 '});
```