Application in NestJS, using a Hexagonal Architecture.
An input port (driving port) lets the application core to expose the functionality to the outside of the world.
A type of interface that is used by the application core to reach things outside of itself
- like getting some data from a database
- consume api from other service
An adapter to use the implementation of the driving/input port. It could be a RESTful API controller, a MVC web controller, or a console app.
- TicketController use TicketService from domain
An adapter to implement the driven/outbound port, It could be used to implement a database, a queue, a messaging system, etc.
- TicketInMemory implement the outbound port It would be injected into the TicketService which is the implementation of the inbound port and the core business logic. The injection itself is handled by nestjs in ticket.module.ts
$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov