Sha256: a45f8f12af28229e63973164004016094c7b439eb818a4a445d17f0b474ab0d5

Contents?: true

Size: 898 Bytes

Versions: 18

Compression:

Stored size: 898 Bytes

Contents

# To deploy this function, cd into its folder and run:
# faastruby deploy-to WORKSPACE_NAME
def handler event
  # The 'event' argument has the following attributes
  # event.body - The request body
  # event.context - The execution context
  # event.headers - The request headers
  # event.query_params - The query params
  
  # 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}

  # TODO: Write code here
end

Version data entries

18 entries across 18 versions & 1 rubygems

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