Run Postgres locally
npm install @shelf/postgres-local> Run any version of Postgres locally
```
$ yarn add @shelf/postgres-local --dev
#### ES Modules
`js
import {start} from '@shelf/postgres-local';
await start({
seedPath: "schema.sql",
version: 17,
port: 5555,
includeInstallation: true,
debugMode: false
});
`
#### CommonJS
`js
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
- true
- when this flag is (default) macOS will run brew install and linux apt install to make sure postgres is installeddebugMode
- when false - package omit installing postgres and relly that it is already in place
- - used for streaming terminal logs during executing start and stop methods$3
`js
import {stop} from '@shelf/postgres-local';
await stop({version: 17});
`
`sh``
$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags
MIT © Shelf