https://github.com/kapetacom/sdk-nodejs-sqldb-postgresql
https://github.com/kapetacom/sdk-nodejs-sqldb-postgresql
nodejs-sdk
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kapetacom/sdk-nodejs-sqldb-postgresql
- Owner: kapetacom
- License: mit
- Created: 2019-06-22T18:56:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-07T15:08:04.000Z (about 2 years ago)
- Last Synced: 2025-10-02T14:57:13.091Z (4 months ago)
- Topics: nodejs-sdk
- Language: TypeScript
- Size: 377 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# NodeJS Postgres support for Kapeta
Creates a client using Prisma and connects to a Postgres database.
Is meant to be used with Kapeta and resources defined in a NodeJS Kapeta block.
Uses Prisma to make it simple to work with Postgres from Kapeta - and
add support for DB migrations.
Also exposes a CLI tool called ```kap-postgres-url``` that can be used
to generate a PG database URL from within a Kapeta block - for a given environment.
To learn more about Kapeta, visit [kapeta.com](https://kapeta.com).
## Usage
This library exposes a class and function that can be used to create a client.
Normal usage is generated using Kapeta - but it can also be used directly.
### `createPostgresDBClient`
Async function that creates a client using Prisma and connects to a Postgres database
### `PostgresDB`
Class that creates a client using Prisma and connects to a Postgres database.
It will auto-initialize once the configuration provider is ready.