commit f8b237c22776610093fe103d4084e6d7eb9cfb59
parent f386b02c74521a0f7f152696f7c1fd61562b093e
Author: Yongbin Kim <iam@yongbin.kim>
Date: Fri, 8 Sep 2023 17:52:41 +0900
Add README
Signed-off-by: Yongbin Kim <iam@yongbin.kim>
Diffstat:
M | .gitignore | | | 2 | +- |
A | README | | | 59 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 60 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
@@ -14,7 +14,7 @@
!go.sum
!go.mod
-!README.md
+!README
!LICENSE
!Makefile
diff --git a/README b/README
@@ -0,0 +1,59 @@
+functions
+----------------
+
+The fool guy's function-as-a-service.
+
+
+What is this?
+----------------
+
+This program is a simple function-as-a-service implementation.
+
+It receives a HTTP request, and executes your program with the request body as stdin.
+The stdout of your program is sent back to the client as HTTP response.
+
+Programs are not executed in a sandbox, so be careful.
+
+
+How to use
+----------------
+
+1. Write your program in Go.
+2. Build your program and place it to `$(pwd)/.functions/$namespace/$function`
+3. Done! Server will build your program, and run it when it receives a HTTP request.
+
+
+URL format
+----------------
+
+You can use the following URL format to call your function.
+
+```
+http://$namespace.domain.tld/$function
+```
+
+This is not optional, so, you must set wildcard DNS record to your domain.
+
+To test on your local machine, you can use this command:
+
+```
+curl --resolve '*:8080:127.0.0.1' http://example.domain.tld:8080/helloworld
+```
+
+
+Why?
+----------------
+
+Because it's fun.
+
+
+License
+----------------
+
+(c) Yongbin Kim
+
+Utilization of the works is permitted provided that this
+instrument is retained with the works, so that any entity
+that utilizes the works is notified of this instrument.
+
+DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.