The client will push a random event message to a webhook endpoint on the sever every 5 seconds.
-
Run the server
$ go run model.go server.go
-
On another shell, run the client:
$ go run model.go client.go
Or use curl to call the webhook.
$ curl -X POST \ http://localhost:8000/webhook \ -H 'Content-Type: application/json; charset=UTF-8' \ -d '{"event": "create"}'
-
Alternatively, you can run everything with just 1 command.
$ make run