derek82511 / node-rpc-proxy-rabbitmq

Simple Node.js rpc proxy implementation with rabbitmq.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a node.js rpc proxy implementation with rabbitmq.

Docker Hub: https://hub.docker.com/r/derek82511/node-rpc-proxy-rabbitmq

GitHub: https://github.com/derek82511/node-rpc-proxy-rabbitmq

Use Node.js

First, modify config/config-func.yaml, config/config-protocol.yaml according to your rpc infos.

npm install

npm start

curl -X POST \
  'http://localhost:3000/rpc?func=[your func]' \
  -H 'content-type: application/json' \
  -d '{ "foo": "bar" }'

Use Docker

docker run -it \
  -p 3000:3000 \
  -e "TZ=Asia/Taipei" \
  -v [path to your func config folder]:/app/config \
  --name node-rpc-proxy-rabbitmq \
  derek82511/node-rpc-proxy-rabbitmq:latest

Testing

curl -X POST \
  'http://localhost:3000/rpc?func=[your func]' \
  -H 'content-type: application/json' \
  -d '{ "foo": "bar" }'

About

Simple Node.js rpc proxy implementation with rabbitmq.

License:MIT License


Languages

Language:JavaScript 99.2%Language:Dockerfile 0.8%