Gain more experience building out an API server with user authentication using TypeScript and the KnexJS query builder.
- KnexJS
- Bash Build System
- Docker / Docker compose
- NPM scripts
Note: You could add a volume mounted at the project directory and see changes real time.
- Start the deployment:
docker compose up --build
- Setup the DB:
docker compose -f compose.dev.yml up --build
- Export:
export DB_ENV=localdev
export NODE_ENV=localdev
export DB_URI=postgresql://postgres:postgres@localhost:5432/disney_parent_dev
- Run migrations:
npm run migrate
- Seed the database:
npm run seed
- Setup the DB:
docker compose -f compose.dev.yml up --build
- Export:
export DB_ENV=testing
export NODE_ENV=testing
export DB_URI_TESTING=postgresql://postgres:postgres@localhost:5432/disney_parent_test
- Run migrations:
npm run migratetest
- Seed the database:
npm run seed