momi-foundation-coding / nodejs-api-cli

This is a scaffold for generating new API-based application for NodeJS and its frameworks such as Express, kemboijs, koa, AdonisJs etc.
http://www.kemboijs.org/
MIT License
10 stars 13 forks source link

Fix issue with database doesn't exit #70

Closed ezkemboi closed 4 years ago

ezkemboi commented 4 years ago

Describe the bug

There is an issue when I run the command NODE_ENV="test" npm run create:db The database does not exist, though I had created a database TEST_DATABASE_URL="postgres://localhost:5432/dbnameTest" In real database practice, db created for this case is dbnametest and not dbnameTest.

To Reproduce Steps to reproduce the behavior:

  1. check above in description

Expected behavior It is expected that we fix it by using dbnametest in put .env, thus need to update command that creates .env and .envExample or we do .toLowerCase() to avoid such bugs in the future.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.