Sha256: 59780a4e954ba1a40cf294cc32b3ce6d636a80c357e7add46958368d4aa1cdf3

Contents?: true

Size: 677 Bytes

Versions: 3

Compression:

Stored size: 677 Bytes

Contents

# To deploy this function, cd into its folder and run:
# faastruby deploy-to WORKSPACE_NAME
def handler event
  # 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 with string keys. Example:
  # render text: 'It Works!', headers: {'TransactionId' => 23928}

  # Write code here
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
faastruby-0.3.8 templates/ruby/example-blank/handler.rb
faastruby-0.3.7 templates/ruby/example-blank/handler.rb
faastruby-0.3.6 templates/ruby/example-blank/handler.rb