nxpm/stack

Add npm script to start postgress container

jonparker opened this issue · 3 comments

Add a script in package.json to start the postgress container by running docker-compose up.

Expected Behavior

A script in package.json to start the database before starting the other scripts.

Current Behavior

If you run the dev:api or dev:sdk scripts in the package.json you get an error

Possible Solution

Add "dev:db": "docker-compose up", to the package.json

Steps to Reproduce (for bugs)

  1. nxpm-stack init --name sandbox
  2. cd sandbox
  3. code .
  4. Run the dev:sdk or dev:api npm scripts.

Context

Prevented me getting started while following the introduction here: https://www.youtube.com/watch?v=NvcRukwY_kM

Your Environment

MacOS Big Sur

  • NPM version: 6.14.8
  • Node version: v12.18.2
  • nxpm/cli version: 4.18.0
  • yarn version: 1.22.5
  • Operating System and version (desktop or mobile): MacOS Big Sur

Output from yarn list @nxpm/cli:

yarn list v1.22.5
warning Filtering by arguments is deprecated. Please use the pattern option instead.
└─ @nxpm/cli@4.18.0
✨ Done in 0.96s.

Thanks for the suggestion, I just added it. I will cut a releases tomorrow that adds it!

Hey there @jonparker, I just published version 4.19.0 which has this feature!

Thanks @beeman