Revision created 1 year ago
docs(datasource-sql): document introspection process
Last updated 2 years ago
Was this helpful?
If you already have an application running using , the easiest way to attach the Forest Admin agent would use the mountOnNestJs function, just like in the following example:
mountOnNestJs
import 'dotenv/config'; import { createAgent } from '@forestadmin/agent'; import { Module } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; @Module({ imports: [], controllers: [], providers: [] }) class AppModule {} (async () => { const agent = createAgent({ authSecret: process.env.FOREST_AUTH_SECRET, envSecret: process.env.FOREST_ENV_SECRET, isProduction: process.env.NODE_ENV === 'production', }); const app = await NestFactory.create(AppModule, { logger: false }); await agent.mountOnNestJs(app).start(); await app.listen(3000); })();