updated Readme.md
This commit is contained in:
parent
4a726291a2
commit
0a64b76687
2 changed files with 24 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,4 +1,4 @@
|
||||||
go.sum
|
go.sum
|
||||||
build/
|
builds/
|
||||||
.idea/*
|
.idea/*
|
||||||
*.iml
|
*.iml
|
24
Readme.md
24
Readme.md
|
@ -29,11 +29,16 @@ Usage of hetzner-sb-notifier:
|
||||||
set serve http
|
set serve http
|
||||||
-serve-http-port int
|
-serve-http-port int
|
||||||
set serve http port (default 8080)
|
set serve http port (default 8080)
|
||||||
|
-output
|
||||||
|
set output: one of table, json (default table)
|
||||||
````
|
````
|
||||||
|
|
||||||
## Http mode
|
## Http mode
|
||||||
|
|
||||||
## Example
|
In HTTP mode (app started with flag -serve-http) hetzner-sb-notifier runs continuously and can be queried via simple HTTP GET request.
|
||||||
|
CLI parameters are translated to camel case. For example min-hdd-count becomes minHddCount
|
||||||
|
|
||||||
|
## CLI-Example
|
||||||
|
|
||||||
./hetzner-sb-notifier --max-price 77 --min-ram 128 --min-hdd-count 2 --min-hdd-size 4096
|
./hetzner-sb-notifier --max-price 77 --min-ram 128 --min-hdd-count 2 --min-hdd-size 4096
|
||||||
````
|
````
|
||||||
|
@ -44,6 +49,23 @@ Got 545 offers. Filtered offers: 3
|
||||||
SB73-910394| 128 GB| 3x 2 TB (6144)| Intel Xeon E5-1650V2 (12518)| 73.00 €| 86.13| 03h 04m|ECC, Ent. HDD, iNIC
|
SB73-910394| 128 GB| 3x 2 TB (6144)| Intel Xeon E5-1650V2 (12518)| 73.00 €| 86.13| 03h 04m|ECC, Ent. HDD, iNIC
|
||||||
````
|
````
|
||||||
|
|
||||||
|
## HTTP-Example
|
||||||
|
|
||||||
|
./hetzner-sb-notifier -serve-http
|
||||||
|
````
|
||||||
|
Running http server on address :8080
|
||||||
|
|
||||||
|
Got request: GET /?minRam=256&output=table HTTP/1.1
|
||||||
|
Host: localhost:8080
|
||||||
|
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
|
||||||
|
Accept-Encoding: gzip, deflate, br
|
||||||
|
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
|
||||||
|
Cache-Control: max-age=0
|
||||||
|
Connection: keep-alive
|
||||||
|
Upgrade-Insecure-Requests: 1
|
||||||
|
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
|
||||||
|
````
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
The Go project uses Go Modules and can be easily build with the wrapper script build.sh:
|
The Go project uses Go Modules and can be easily build with the wrapper script build.sh:
|
||||||
|
|
Reference in a new issue