Go version > 1.23.5
In root directory:
Build application binary
$ go build main.goSpecify endpoints in config.json
Run the application
$ ./main <port>{
"logPath": "go-getter.log",
"concurrentScriptsLimit": 3,
"endpoints": {
"/data1": {
"scriptPath": "./script1.sh",
"contentType": "application/json",
"requireAuth": true,
"apiKeys": {
"abc123": "dev",
"def456": "prod"
}
},
"/data2": {
"scriptPath": "./script2.sh",
"contentType": "text/plain",
"requireAuth": false
}
}
}$ curl -H "Authorization: ApiKey abc123" localhost:7980/data1