dockerized-postgres

Simple package for starting and shutting down dockerized postgres instance (mainly for tests purposes)

Usage no npm install needed!

<script type="module">
  import dockerizedPostgres from 'https://cdn.skypack.dev/dockerized-postgres';
</script>

README

Simple package for starting and shutting down dockerized postgres instance (mainly for tests purposes)

Usage example:

const DockerizedPostgres = require('dockerized-postgres');

const postgres = new DockerizedPostgres({
  beforeHook: (port) => {}, // will be called before container start
  afterHook: (port) => {}, // will be called right after container shutdown,
  tag: '11', // image tag
});

await postgres.start();
await postgres.shutdown();