nxpm / stack

🥭 nxpm-stack lets you generate a complete and opinionated full-stack application in a Nx Workspace, ready to extend and deploy!
https://npm.im/@nxpm/stack
MIT License
108 stars 14 forks source link

Add npm script to start postgress container #138

Closed jonparker closed 3 years ago

jonparker commented 3 years ago

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

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.

beeman commented 3 years ago

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

beeman commented 3 years ago

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

jonparker commented 3 years ago

Thanks @beeman