Run any version of Postgres locally
$ yarn add @shelf/postgres-local --dev
import {start} from '@shelf/postgres-local';
await start({
seedPath: "schema.sql",
version: 17,
port: 5555,
includeInstallation: true,
debugMode: false
});const {start} = require('@shelf/postgres-local');
await start({
seedPath: "schema.sql",
version: 17,
port: 5555,
includeInstallation: true,
debugMode: false
});seedPath- absolute path to sql file with commands that will set up db structure before testsincludeInstallation- when this flag is
true(default) macOS will runbrew installand linuxapt installto make surepostgresis installed - when false - package omit installing postgres and relly that it is already in place
- when this flag is
debugMode- used for streaming terminal logs during executingstartandstopmethods
import {stop} from '@shelf/postgres-local';
await stop({version: 17});$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tagsMIT © Shelf