UNPKG

pg-embedded

Version:

Embedded PostgreSQL database for Node.js - Easy setup, high performance, TypeScript support

16 lines (15 loc) 386 B
import { PostgresInstance as Postgres } from './binding.js' export * from './binding.js'; export class PostgresInstance extends Postgres { constructor(settings) { super(settings) // catch Ctrl+C process.on('SIGINT', async () => { await this.cleanup() }); // catch kill command process.on('SIGTERM', async () => { await this.cleanup() }); } }