Opposite of Cloud-Functions: Run scripts on the local machine through HTTP calls
Go to file
Knut Ahlers 06c38a3a97
Add example scripts / README example
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2020-10-02 01:11:58 +02:00
scripts Add example scripts / README example 2020-10-02 01:11:58 +02:00
go.mod Initial version 2020-10-02 01:06:07 +02:00
go.sum Initial version 2020-10-02 01:06:07 +02:00
LICENSE Initial version 2020-10-02 01:06:07 +02:00
main.go Initial version 2020-10-02 01:06:07 +02:00
README.md Add example scripts / README example 2020-10-02 01:11:58 +02:00

Go Report Card

Luzifer / local-functions

local-functions is intended as the opposite of Cloud-Functions: Run scripts on the local machine through HTTP calls.

Be aware: This will expose scripts in a certain folder on your machine. This might cause trouble for you! So you really should only expose the server on localhost and ensure nobody else is able to access the API.

Examples

# curl -d '{"test": "foo"}' -H 'Content-Type: application/json' -X POST localhost:3000/echo
PWD=/home/luzifer/workspaces/private/go/src/github.com/Luzifer/local-functions
ACCEPT=*/*
SHLVL=1
CONTENT_TYPE=application/json
METHOD=POST
_=/usr/bin/env

=====

{"test": "foo"}