1.0.1 • Published 10 years ago

mapple v1.0.1

Weekly downloads
2
License
MIT
Repository
-
Last release
10 years ago

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));
  • db can be either a MongoDB URL, a Db object (created with the native driver mongodb) or a Collection object.
  • collectionName is optionnal. It's the pages collection's name. It defaults to pages.

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

10 years ago

1.0.0

10 years ago

0.3.1

10 years ago

0.2.11

10 years ago

0.2.10

10 years ago

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.1

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago