https://github.com/aricart/rest-nats
https://github.com/aricart/rest-nats
http nats rest
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aricart/rest-nats
- Owner: aricart
- License: apache-2.0
- Created: 2018-05-08T23:37:16.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T03:32:00.000Z (about 8 years ago)
- Last Synced: 2025-01-24T17:18:17.452Z (over 1 year ago)
- Topics: http, nats, rest
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# REST-NATS
REST-NATS is a simple server that accepts HTTP requests on a port, and publishes
an equivalent message on NATS.
The URL for the request is converted to a subject by removing the leading separator on the URL,
and replacing all separators with a `.`, i.e. `http://server:port/hello/world` converts to `hello.world`.
The payload if any becomes the message body. Any requests to `/` are illegal, since the leading
separator is removed and would result in an empty subject.
REST-NATS supports an embedded mode, in which it runs an embedded NATS server.
### Options
```
-e Embed gnatsd (for testing)
-hp string
NATS host port (default "localhost:4222")
-w string
HTTP host port (default "localhost:8080")
```