1.0.1 • Published 11 years ago
mapple v1.0.1
Mapple
A Connect middleware that matches request's url with a MongoDB document. Also allows to PUT and DELETE pages (or documents).
Usage
Install with npm install mapple. Then, where app is a connect or express app :
mapple = require('mapple');
...
app.use(mapple(db, collectionName));dbcan be either a MongoDB URL, a Db object (created with the native drivermongodb) or a Collection object.collectionNameis optionnal. It's the pages collection's name. It defaults topages.
The middleware populates res.locals.document with the db document corresponding to the requested url (url is stored in the field route of the document).
1.0.1
11 years ago
1.0.0
12 years ago
0.3.1
12 years ago
0.2.11
12 years ago
0.2.10
12 years ago
0.2.9
12 years ago
0.2.8
12 years ago
0.2.7
12 years ago
0.2.6
12 years ago
0.2.5
12 years ago
0.2.4
12 years ago
0.2.3
12 years ago
0.2.1
12 years ago
0.1.4
12 years ago
0.1.3
12 years ago
0.1.2
12 years ago
0.1.1
12 years ago
0.1.0
12 years ago