derekcollison / nats-http

Using HTTP Request and Response with NATS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

> go run main.go

In a separate terminal

> curl -i localhost:8080/foo
> nats-req foo hello

About

Using HTTP Request and Response with NATS

License:Apache License 2.0


Languages

Language:Go 100.0%