Sha256: 108c62933d4b16db355c1e2eabc2af965a19e1c821086215f6265f4d3b2c07c1

Contents?: true

Size: 878 Bytes

Versions: 21

Compression:

Stored size: 878 Bytes

Contents

# To deploy this function, cd into its folder and run:
# faastruby deploy-to WORKSPACE_NAME
def handler(event : FaaStRuby::Event) : FaaStRuby::Response
  # event.body : String | Nil
  # event.headers : Hash(String, String)
  # event.context : String | Nil
  # query_params : Hash(String, String)

  # FUNCTION RESPONSE
  #
  # You can render text, json, yaml, html or js. Example:
  # render html: "<p>Hello World!</p>"
  # render yaml: {"hello" => "world!"}
  #
  # Status:
  # The default status is 200. You can set a custom status like this:
  # render json: {"error" => "Could not perform the action"}, status: 422
  #
  # Headers:
  # The 'Content-Type' header is automatically set when you use 'render'.
  # You can set custom headers using a Hash(String, String). Example:
  # render text: "It Works!", headers: {"TransactionId" => 23928}

  # TODO: Write code here!
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
faastruby-0.4.18 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.17 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.16 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.15 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.14 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.12 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.11 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.10 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.9 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.8 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.7 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.6 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.5 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.4 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.3 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.2 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.1 templates/crystal/example-blank/src/handler.cr
faastruby-0.4.0 templates/crystal/example-blank/src/handler.cr
faastruby-0.3.8 templates/crystal/example-blank/src/handler.cr
faastruby-0.3.7 templates/crystal/example-blank/src/handler.cr