Skip to content

Commit b626ed3

Browse files
committed
basic demo
1 parent 2d33fdb commit b626ed3

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ gem "hooks-ruby", "~> X.X.X" # Replace X.X.X with the latest version
2929
# file: config.ru
3030
require "hooks-ruby"
3131

32-
app = Hooks.build(config: "hooks.yaml")
32+
config = {
33+
use_catchall_route: true # will use the DefaultHandler for /webhooks/* - just an example/demo
34+
}
35+
36+
app = Hooks.build(config: config)
3337
run app
3438
```
3539

@@ -39,6 +43,21 @@ Run the hooks server:
3943
bundle exec puma --tag hooks
4044
```
4145

46+
Send a webhook request to the server:
47+
48+
```bash
49+
curl --request POST \
50+
--url http://0.0.0.0:9292/webhooks/hello \
51+
--header 'content-type: application/json' \
52+
--data '{}'
53+
54+
# => { "message": "webhook processed successfully", "handler": "DefaultHandler", "timestamp": "2025-06-10T23:15:07-07:00" }
55+
```
56+
57+
Congratulations! You have successfully set up a basic Hooks server which will listen to anything under `/webhooks/*` and respond with a success message.
58+
59+
Keep reading to learn how to customize your Hooks server with different plugins for handlers, authentication, and more.
60+
4261
### Advanced
4362

4463
TODO

0 commit comments

Comments
 (0)