simple (mock) web server framework written in awk
Webawk is a simple JSON API server framework for awk. This helps to make dummy-response server by only awk one-line command.
$ ./webawk.sh 'GET("/names") { b["names"][1]="Taro"; res(200, b) }'
$ curl localhost:8080/names
{"names":["Taro"]}
- GNU awk (5.x.x+)
- should be installed as
gawk
- should be installed as
- jq
- because I have not written a JSON parser yet 😏
Or you can run webawk docker image.
$ docker pull ghcr.io/syuparn/webawk:0.3.0
See https://github.com/users/Syuparn/packages/container/package/webawk for detail.
See ./examples
for practical examples.
You can also check command options by ./webawk.sh -h
.