Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 472 Bytes

README.md

File metadata and controls

17 lines (12 loc) · 472 Bytes

@Astrocoders/postgres-orm ⚡️🔨

Installation

yarn add @astrocoders/postgres-orm postgres or npm install @astrocoders/postgres-orm postgres

Usage

import createORM from '@Astrocoders/postgres-orm'
import * as pg from 'postgres'

export const pool = new pg.Pool(config)
export const connect = () =>
  pool.connect().then(() => console.log('Connection successful'))

const orm = createORM({ entityMapperClass, tableName, debug, client: pool })