1.0.7 • Published 1 month ago

@shelf/postgres-local v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

postgres-local CircleCI npm.io npm (scoped)

Run any version of Postgres locally

Usage

0. Install

$ yarn add @shelf/postgres-local --dev

1. Start Postgres

import {start} from '@shelf/postgres-local';

await start({
  seedPath: "schema.sql",
  version: 14,
  port: 5555,
  includeInstallation: true,
  debugMode: false
});
  • seedPath - absolute path to sql file with commands that will set up db structure before tests
  • includeInstallation
    • when this flag is true (default) macOS will run brew install and linux apt install to make sure postgres is installed
    • when false - package omit installing postgres and relly that it is already in place
  • debugMode - used for streaming terminal logs during executing start and stop methods

2. Stop Postgres

import {stop} from '@shelf/postgres-local';

await stop({version: 14});

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags

License

MIT © Shelf

1.0.7

1 month ago

1.0.6

5 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.1

1 year ago

0.1.0-alpha

1 year ago