Sha256: d179ffe8fc671355eafd10cdb2d360115a3182bdc98b94427fc9983d506db585

Contents?: true

Size: 585 Bytes

Versions: 8

Compression:

Stored size: 585 Bytes

Contents

module Template
  def self.functions_app
    <<~APP
      require "functions_framework"
      require "sinatra/base"
      require "dotenv/load"

      class App < Sinatra::Base
        get "/souls-functions-get/:name" do
          "SOULs Functions Job Done! - \#{params['name']}"
        end

        post "/souls-functions-post" do
          params = JSON.parse(request.body.read)
          "SOULs Functions Job Done! - \#{params['name']}"
        end
      end

      FunctionsFramework.http("souls_functions") do |request|
        App.call(request.env)
      end
    APP
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
souls-1.15.5 lib/souls/cli/create/template/functions_app.rb
souls-1.15.4 lib/souls/cli/create/template/functions_app.rb
souls-1.15.3 lib/souls/cli/create/template/functions_app.rb
souls-1.15.2 lib/souls/cli/create/template/functions_app.rb
souls-1.15.1 lib/souls/cli/create/template/functions_app.rb
souls-1.15.0 lib/souls/cli/create/template/functions_app.rb
souls-1.14.3 lib/souls/cli/create/template/functions_app.rb
souls-1.13.8 lib/souls/cli/create/template/functions_app.rb