mongoose-friendly
Friendly URLs for you Mongoose models.
Usage
Simply install the mongoose-friendly
plugin in your schema like this:
var mongoose = ;var friendly = ;var MySchema = title: String ;MySchema;
A static method findByFriendly
is added to your schema, and you can use it as if you were using findById
.
Here are the options (as defaults) you can pass when installing the plugin:
MySchema;
License
This is licensed under the feel-free-to-do-whatever-you-want-to-do license.