Skip to content

Instantly share code, notes, and snippets.

@lfv89
Created October 14, 2018 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lfv89/e9b3b6614d07ee0b9a3579e7e67a3cb0 to your computer and use it in GitHub Desktop.
Save lfv89/e9b3b6614d07ee0b9a3579e7e67a3cb0 to your computer and use it in GitHub Desktop.
hello world with puma on rack
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'rack'
gem 'puma'
end
require 'rack/handler/puma'
class PumaRackApp
def call(env)
['200', {'Content-Type' => 'text/html'}, ['Hello, World!']]
end
end
Rack::Handler::Puma.run(PumaRackApp.new, Port: 3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment