Install in Express/Sequelize

Now that you've followed the first steps of our sign-up process, let's install Forest Admin in your Express/Sequelize app.

1. Start by installing the Liana in the terminal

npm install forest-express-sequelize --save

2. Setup the Forest Liana middleware in your app.js file

app.js
app.use(require('forest-express-sequelize').init({
modelsDir: __dirname + '/models',
envSecret: process.env.FOREST_ENV_SECRET,
authSecret: process.env.FOREST_AUTH_SECRET,
sequelize: require('models').sequelize,
}));

3. Setup your Forest environment variables and do not version them

FOREST_ENV_SECRET=9d1f44d4ba4cfe02db31a7fb751e...eeda94bdc93aa47a
FOREST_AUTH_SECRET=77a3b1e39bb3b0182aee...c7c270d0466af446f

The environment secret is given by to you during your on-boarding on forestadmin.com. If you haven't done so, go to forestadmin.com and click on "Install Forest Admin".

4. Restart your server

npm start

5. Set your correct application URL

Then, verify your application URL (by default http://localhost:3000) and click Verify.

Congrats, you're now fully on-boarded! 🎉

Repeat your Forest password to authenticate yourself to your back office API and then follow the Setup Guide to customize your back office for your needs.