fastdev-psql
v1.3.3
Published
Quickly set up psql instance
Downloads
29
Readme
Quickly start Postgres DB
Use-case
You need to quickly spin postgres and you don't afraid to use docker.
Usage
import PSQL from 'fastdev-psql';
let psql = new PSQL({
name: 'test-psql', // Name of the container
port: 9999, // Host port
user: 'test-user', // Database user
password: 'test-pass', // Database password
db: 'test-db', // Database name
dump: `${__dirname}/dump.sql` // dump (optional)
});
psql.pump(); // Pump **all** info into stdout
psql.log(); // Show "pretty" output
psql.up().then(() => console.log('done and done'));