forest-express-mongoose
v9.6.11
Published
Official Express/Mongoose Liana for Forest
Readme
[!IMPORTANT] This is the Forest v1 agent for Express and Mongoose, in maintenance mode. It receives fixes but no new features. Starting a new project? Use agent-nodejs, the current Node.js agent. Already on forest-express-mongoose? Follow the v1 to v2 migration guide.
Quick start
npm install forest-express-mongooseconst Liana = require('forest-express-mongoose');
app.use(await Liana.init({
objectMapping: Mongoose, // your project's Mongoose instance
connections: { default: connection },
envSecret: process.env.FOREST_ENV_SECRET,
authSecret: process.env.FOREST_AUTH_SECRET,
}));Exact signature and optional settings (includedModels, excludedModels, configDir, schemaDir): types/index.d.ts.
Full guide: docs.forest.app/legacy/javascript-agents/how-tos/setup/install
Requirements
| | |
|---|---|
| Node.js | >= 16 (CI runs on 24) |
| Database | MongoDB |
| ODM | Mongoose (your own instance, passed as objectMapping) |
This package builds on forest-express, the shared core of the v1 Express agents.
How it works
The package runs inside your Express application. It introspects your Mongoose models and generates the admin API on your servers. The Forest interface calls this API: your data does not go through Forest.
Documentation
| | | |---|---| | Install | https://docs.forest.app/legacy/javascript-agents/how-tos/setup/install | | v1 reference guide | https://docs.forest.app/legacy/javascript-agents/reference-guide/models/overview | | Upgrade notes | https://docs.forest.app/legacy/javascript-agents/how-tos/maintain/upgrade-notes-sql-mongodb/upgrade-to-v9 | | Agents overview | https://docs.forest.app/legacy/agents-overview | | Migrating to v2 | https://docs.forest.app/guides/migration/from-v1/overview |
Contributing
Bug fixes are welcome; new features go to agent-nodejs. See CONTRIBUTING.md for setup, tests and commit conventions.
yarn install --frozen-lockfile && docker compose up -d && yarn testLicense
Apache 2.0. See LICENSE.
