Api Rest with Nest + Hexagonal Architecture + DDD & CQRS.
Configuration for development.
-
Copy .env.example to .env and configure it.
-
Execute docker compose:
docker compose up
- Run migrations:
docker compose run app npm run mikroorm migration:up
- Create user with google (check oauth2 section). It's to get a token from google and it allow you to use the endpoint /api/v1/auth/login to log in to the application.
After running docker compose up, the application will be available at http://localhost:4000
To generate migrations run the next command:
docker compose run app npm run mikroorm migration:create
To execute migrations run the next command:
docker compose run app npm run mikroorm migration:up
To get a token for testing you should go to https://developers.google.com/oauthplayground and configure it as "Use your own OAuth credentials" after that you should use Google OAuth2 API v2.
To consume async domain events you need to run the next command:
make run-consume-domain-events
Follow the readme in .k8s/README.md