feat: add files
This commit is contained in:
parent
b44931ff90
commit
d5baecaaca
3 changed files with 137 additions and 3 deletions
51
README.md
51
README.md
|
@ -1,4 +1,49 @@
|
|||
# simple-webhook-server
|
||||
# Simple Webhook Server
|
||||
|
||||
A simple server for receiving for testing with webhook calls.
|
||||
The server responds with every request method and logs the full data sent to the server to the console.
|
||||
A simple server for testing webhook calls.
|
||||
The server responds with every request method and logs the full data sent to the server to the console.
|
||||
|
||||
Example request:
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"foo": "bar"}' http://localhost:3000
|
||||
```
|
||||
|
||||
Server Console:
|
||||
|
||||
```
|
||||
2025-04-09T08:07:07.151Z - POST /
|
||||
Headers: {
|
||||
"host": "localhost:3000",
|
||||
"user-agent": "curl/8.5.0",
|
||||
"accept": "*/*",
|
||||
"content-type": "application/json",
|
||||
"content-length": "14"
|
||||
}
|
||||
Body: {
|
||||
"foo": "bar"
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
This currently supports running with node and docker
|
||||
|
||||
|
||||
### Running with node
|
||||
```bash
|
||||
node server.js
|
||||
```
|
||||
|
||||
The server allows the following options:
|
||||
|
||||
- `--port`: The port to listen on. Default: 3000
|
||||
- `--host`: The host to bind the server to. Default: localhost
|
||||
|
||||
### Running with docker
|
||||
|
||||
```bash
|
||||
docker run -p 3000:3000 git.eplg.services/obvtiger/simple-webhook-server:latest
|
||||
```
|
||||
|
||||
You can change the port by modifying the first 3000 in the `-p` option.
|
Loading…
Add table
Add a link
Reference in a new issue