FoodHut App Base API Gateway for FoodHut; A simple food ordering application.
Order Processing Service Order creation and updates.
Dispatch Service Service Updates dispatch status of the order.
Proto Repo Proto files shared across the api gateway and 2 microservices
-
Ensure Node and Yarn are Installed
-
Ensure Protocol buffers are installed (Optional)
# for mac users
$ brew install protobuf
# for linux users
sudo apt install protobuf-compiler
- Ensure Postgres Is Installed
- Install Dependencies
$ yarn install
- Generate fresh protobuf files (Optional)
$ yarn proto:install && yarn proto:all
-
Create a
.env
file from the data in.env.example
file -
Update
.env
file with database information that you've configured for the project
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn run start:prod
# unit tests
$ yarn test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
# generate migration
$ yarn generate:migration -- db/migrations/<migration_name>
# run migration
$ yarn run:migration
# revert migration
$ yarn revert:migration