https://github.com/4lessandrodev/amqp-direct
Testando a conexão direta com amqp
https://github.com/4lessandrodev/amqp-direct
Last synced: about 1 year ago
JSON representation
Testando a conexão direta com amqp
- Host: GitHub
- URL: https://github.com/4lessandrodev/amqp-direct
- Owner: 4lessandrodev
- Created: 2023-01-15T22:14:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-16T02:08:48.000Z (about 3 years ago)
- Last Synced: 2025-01-07T14:25:07.385Z (about 1 year ago)
- Language: TypeScript
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Testando rabbitmq - Sem Framework
Conexão direta com amqp sem usar nenhum framework

> Referência: [Documentação](https://www.rabbitmq.com/tutorials/tutorial-three-javascript.html)
---
## Rodar o projeto
Requisitos:
- NodeJS V14+ [here](https://nodejs.org/en/download/)
- yarn [here](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable)
- docker [here](https://docs.docker.com/engine/install/ubuntu/)
- docker-compose [here](https://docs.docker.com/compose/install/)
- linux, wsl or mac
- build-essentials [here](https://linuxhint.com/install-build-essential-ubuntu/)
---
### Primeiros passos
Clone o projeto e exetute os passos
- Installar as dependências
```sh
make install
```
- Iniciar o projeto
```sh
make start
```
- Visualizar logs
```sh
make logs
```
- Parar o projeto
```sh
make stop
```
- Deletar apps
```sh
make delete
```
Enviando dados para a routing-key-01
```sh
curl --location --request POST 'http://localhost:4000/1' \
--header 'Content-Type: application/json' \
--data-raw '{
"some": "any data to route 1"
}'
```
Enviando dados para a routing-key-02
```sh
curl --location --request POST 'http://localhost:4000/2' \
--header 'Content-Type: application/json' \
--data-raw '{
"some": "any data to route 2"
}'
```