functions

The Fool guy's FAAS
git clone git://git.lair.cx/functions
Log | Files | Refs | README

README (1592B)


      1 functions
      2 ----------------
      3 
      4 The fool guy's function-as-a-service.
      5 
      6 
      7 What is this?
      8 ----------------
      9 
     10 This program is a simple function-as-a-service implementation.
     11 
     12 It receives a HTTP request, and executes your program with the request body as
     13 stdin.
     14 
     15 The stdout of your program is sent back to the client as HTTP response.
     16 
     17 Programs are not executed in a sandbox, so be careful.
     18 
     19 
     20 How to use
     21 ----------------
     22 
     23 1. Write your program in any language you want.
     24    (I recommend Go since I provide a utility library - see '/pkg/functions' and
     25     example programs in '/examples')
     26 2. Build your program and place it to `{configs.FuncDir}/$namespace/$function`
     27 3. Done! The server will serve your function.
     28 
     29 
     30 URI format
     31 ----------------
     32 
     33 You can use the following URI format to call your function.
     34 (Note that wildcard subdomain is required.)
     35 
     36 ```
     37 {http|https}://{namespace}.{rootDomain}/{function}
     38 ```
     39 
     40 This will call `{configs.FuncDir}/$namespace/$function`.
     41 
     42 To test on your local machine, you can use this command:
     43 
     44 ```
     45 curl --resolve '*:8080:127.0.0.1' http://example.domain.tld:8080/helloworld
     46 ```
     47 
     48 
     49 Configuration
     50 ----------------
     51 
     52 You can configure the server by editing `configs/config.go`.
     53 
     54 As an exception, `rootDomain` can be set with `ROOT_DOMAIN` environment variable.
     55 
     56 
     57 Why you made this?
     58 ----------------
     59 
     60 Because it's fun.
     61 
     62 
     63 License
     64 ----------------
     65 
     66 (c) Yongbin Kim
     67 
     68 Utilization of the works is permitted provided that this instrument is retained
     69 with the works, so that any entity that utilizes the works is notified of this
     70 instrument.
     71 
     72 DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.