Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.37 KB

README.md

File metadata and controls

54 lines (35 loc) · 1.37 KB

Typescript-ddd-cqrs backend

Api Rest with Nest + Hexagonal Architecture + DDD & CQRS.

Development

Configuration for development.

Configuration

  1. Copy .env.example to .env and configure it.

  2. Execute docker compose:

    docker compose up
  1. Run migrations:
    docker compose run app npm run mikroorm migration:up
  1. 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.

Running

After running docker compose up, the application will be available at http://localhost:4000

Migrations

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

Oauth2

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.

Consume async domain events

To consume async domain events you need to run the next command:

  make run-consume-domain-events

Deployment with Kubernetes

Follow the readme in .k8s/README.md