The official Express/Mongoose liana for Forest.
- Run
$ npm install forest-express-mongoose --save
- Add the following code to your
app.js
file:
app.use(require('forest-express-mongoose').init({
modelsDir: __dirname + '/models', // The directory where all of your Mongoose models are defined.
secretKey: 'ultrasecretkey', // The secret key given my Forest.
authKey: 'catsOnKeyboard', // Choose an secret authentication key.
mongoose: require('mongoose') // The mongoose instance given by require('mongoose').
}));