Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamfortune/platformatic-rabbitmq-hooks-poc
A Platformatic Runtime application POC on using Platformatic RabbitMQ hooks for messaging.
https://github.com/iamfortune/platformatic-rabbitmq-hooks-poc
Last synced: 10 days ago
JSON representation
A Platformatic Runtime application POC on using Platformatic RabbitMQ hooks for messaging.
- Host: GitHub
- URL: https://github.com/iamfortune/platformatic-rabbitmq-hooks-poc
- Owner: iamfortune
- Created: 2024-05-20T20:04:22.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-22T14:15:34.000Z (6 months ago)
- Last Synced: 2024-05-22T15:31:03.812Z (6 months ago)
- Language: JavaScript
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Platformatic RabbitMQ Hooks Runtime POC
This project demonstrates how to use Platformatic to invoke RabbitMQ hooks from a Platformatic service. The client interacts with a remote OpenAPI and GraphQL API using Platformatic's client.
## Prerequisites
- [Docker](https://www.docker.com/)
- [RabbitMQ](https://www.rabbitmq.com/)
- [Node.js](https://nodejs.org/en)
- [Platformatic CLI](https://docs.platformatic.dev/docs/cli)## Setup
### Step 1: Start RabbitMQ using Docker
Create a `docker-compose.yml` file with the following contents:
```yaml
services:
rabbitmq:
image: rabbitmq:3
container_name: 'rabbitmq'
ports:
- 5672:5672
- 15672:15672
```Start RabbitMQ by running:
```bash
docker-compose up
```This command will start RabbitMQ with the ports exposed.
### Step 2: Create Platformatic Client
After setting up RabbitMQ, you can create a Platformatic client to interact with your Platformatic service. Run the following command:
```bash
npx platformatic client --runtime --name
```Replace `` with your specific service ID or name, and `` with a name for your client.
The created client can now be used to invoke RabbitMQ hooks from your Platformatic service. Refer to the [Platformatic client documentation](https://docs.platformatic.dev/docs/client/overview) for detailed usage instructions and examples.
## Usage
Install dependencies and start your application:
```bash
npm install
npm start
```## Additional Resources
- [Platformatic Documentation](https://docs.platformatic.dev)
- [Platformatic Runtime documentation](https://docs.platformatic.dev/docs/runtime/overview)
- [Platformatic service documentation](https://docs.platformatic.dev/docs/service/overview)
- [Platformatic Client documentation](https://docs.platformatic.dev/docs/client/overview)