@alphacodez/alphadb
v0.0.1
Published
Supported services are: Auth, Chat, Driver, Payment, with their service names in all lowercase.
Readme
How to use
Supported services are: Auth, Chat, Driver, Payment, with their service names in all lowercase.
Install
npm install @evoolv/db-packageUsage
Using the Prisma Client
import { AuthPrismaService } from "@evoolv/db-package";
const authPrismaService = new AuthPrismaService();
await authPrismaService.CheckHealth();import { AuthPrismaService } from "@evoolv/db-package";
export class AuthService {
constructor(private authPrismaService: AuthPrismaService) {}
async listUsers() {
return await this.authPrismaService.user.findMany();
}
}Creating Migrations
CREATING MIGRATION FOR ALL SERVICES
npm run make-migrationCREATING MIGRATION FOR A SINGLE SERVICE
npm run make-migration:<service_name>
npm run make-migration:authGENERATING PRISMA CLIENT FOR ALL SERVICES
npm run generateGENERATING PRISMA CLIENT FOR A SINGLE SERVICE
npm run generate:<service_name>
npm run generate:authRUNNING MIGRATION FOR ALL SERVICES
npm run migrateRUNNING MIGRATION FOR A SINGLE SERVICE
npm run migrate:<service_name>
npm run migrate:authEnvironment Variables
| Name | Description | Default | | --- | --- | --- | | AUTH_DATABASE_URL | Auth Database URL | postgresql://user:password@localhost:5432/evoolve_auth | | CHAT_DATABASE_URL | Chat Database URL | postgresql://user:password@localhost:5432/evoolve_chat | | DRIVER_DATABASE_URL | Driver Database URL | postgresql://user:password@localhost:5432/evoolve_driver | | PAYMENT_DATABASE_URL | Payment Database URL | postgresql://user:password@localhost:5432/evoolve_payment |
License
MIT
