Simple service using hexagonal architecture in Nest.js. This is a clean and clear approach of the use of Nest.js with SOLID & Clean architectue.
I'm open to suggestions and feedback, please contact me at my email.
- NestJS
- Node.js
- Express.js
- RabbitMQ
- Docker
- Make
- Docker-compose
- Typescript
- Clean Architecture
- Hexagonal Architecture
- Advanced Generics in Typescript
- abstraction of the rabbitmq connection
- complete crud
- guards
- middlewares
- docker
- make
- docker-compose
First
Add the .env file to the root directory in the project (I'll send you a copy of mine)
REPOSITORY_SERVICE_URL=
RABBIT_URI=
RABBIT_EXCHANGE=
RABBIT_QUEUE=
Second
I'm using makefile to facilitate the start so you can run any of this commands:
# to run the nest project and the rabbitmq instance
$ make up-all
Don't be afraid if it shows red messages, it is attempting to connect to the rabbitmq server
# to run only the nest project
$ make up-app
# to run only the rabbitmq instance
$ make up-queue
You can also use the docker-compose commands to start the projects.
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
- Author - aLucaz
- Linkedin - Arturo Lucas