# Install the liana
npm install forest-express-mongoose --save
// Setup the Forest Liana middleware in your app.js file
app.use(require('forest-express-mongoose').init({
modelsDir: __dirname + '/models', // Your models directory.
envSecret: process.env.FOREST_ENV_SECRET,
authSecret: process.env.FOREST_AUTH_SECRET,
mongoose: require('mongoose') // The mongoose database connection.
}));
# Setup Forest environment variables and do not version them
FOREST_ENV_SECRET=b69e629a12d252e1a3e3d7be7d329061a95073b4c5e3eae8af7d161ab4c7191b
FOREST_AUTH_SECRET=9MC*0gC5*tuCK(2+
# Restart your server