We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any example app that works with postgres db?
thanks
The text was updated successfully, but these errors were encountered:
import { Module } from '@nestjs/common'; import { AdminModule } from '@adminjs/nestjs'; import { ConfigModule } from '@nestjs/config'; import { Database, Resource, getModelByName } from '@adminjs/prisma'; import AdminJS from 'adminjs'; import { PrismaService } from 'nestjs-prisma'; import { AppController } from './app.controller.js'; import { AppService } from './app.service.js'; import provider from './admin/auth-provider.js'; AdminJS.registerAdapter({ Database, Resource }); @Module({ imports: [ ConfigModule.forRoot({ envFilePath: '.env', }), AdminModule.createAdminAsync({ useFactory: () => { const prisma = new PrismaService(); return { auth: { provider, cookiePassword: process.env.COOKIE_SECRET, cookieName: 'adminjs', }, sessionOptions: { resave: true, saveUninitialized: true, secret: process.env.COOKIE_SECRET, }, adminJsOptions: { rootPath: '/admins', resources: [ { resource: { model: getModelByName('User'), client: prisma }, options: {} }, { resource: { model: getModelByName('Dog'), client: prisma }, options: {} }, { resource: { model: getModelByName('Hotel'), client: prisma }, options: {} }, { resource: { model: getModelByName('Service'), client: prisma }, options: {} }, { resource: { model: getModelByName('Booking'), client: prisma }, options: {} }, { resource: { model: getModelByName('Payment'), client: prisma }, options: {} }, { resource: { model: getModelByName('Review'), client: prisma }, options: {} }, ], }, }; }, }), ], controllers: [AppController], providers: [AppService], }) export class AppModule {}
Sorry, something went wrong.
No branches or pull requests
Is there any example app that works with postgres db?
thanks
The text was updated successfully, but these errors were encountered: