Skip to content

Wait for a database to be available prior to launching subsequent commands. ๐Ÿ“™โŒ›

License

Notifications You must be signed in to change notification settings

ridafkih/awaitabase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Deploy Package on NPM

Awaitabase

A CLI tool that allows you to ensure a database is live before closing the process.

AWAITABASE_EXAMPLE.mov

Usage

Command Structure

# If the optionalUrl is not defined, it will default to the DATABASE_URL environment variable.
npx awaitabase [driver] [optionalUrl]

General CLI

npx awaitabase postgres postgres://user:password@localhost/database

# โ ผ Connecting to database... 0/30
# โ ผ Connecting to database... 1/30
# โœ” Database confirmed as active

Inside NPM Project

npm i -D awaitabase
// package.json
{
  // ...
  "scripts": {
    "database:wait": "awaitabase postgres postgres://user:password@localhost/database",
    "start": "database:wait && node ."
  }
  // ...
}

About

Wait for a database to be available prior to launching subsequent commands. ๐Ÿ“™โŒ›

Resources

License

Stars

Watchers

Forks

Packages

No packages published