Skip to content
David Joseph edited this page Nov 11, 2021 · 1 revision

An instance of an Express.js Router. Used to handle routing for a resource.

Options

Required

model: A mongoose.model indicating the resource for CRUD operations to be performed.

modelName: A string representing the extended URL at which the resource can be accessed.

Optional

controller: An instance of a custom Controller. Uses the default controller if not specified.

Functions

create: Used to return the Express router from the Router instance.

Clone this wiki locally