Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derekcollison/nats-http
Using HTTP Request and Response with NATS
https://github.com/derekcollison/nats-http
Last synced: 14 days ago
JSON representation
Using HTTP Request and Response with NATS
- Host: GitHub
- URL: https://github.com/derekcollison/nats-http
- Owner: derekcollison
- License: apache-2.0
- Created: 2020-01-14T21:11:31.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-10-31T19:56:17.000Z (about 1 year ago)
- Last Synced: 2024-10-14T13:54:50.636Z (28 days ago)
- Language: Go
- Size: 18.6 KB
- Stars: 23
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NATS-HTTP
Small example to show re-use of an HTTP handlerFunc for both HTTP and NATS.
You can use a local NATS server or it will automatically use the demo server. If you use the demo server add `-s demo.nats.io` to the nats-req call below.```bash
> go run main.go
```In a separate terminal
```bash
> curl -i localhost:8080/foo
> nats-req foo hello
```