Skip to content

Instantly share code, notes, and snippets.

@lfv89
Last active October 14, 2018 18:35
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/ba8ad9180ab720cce482dbaad77300da to your computer and use it in GitHub Desktop.
Save lfv89/ba8ad9180ab720cce482dbaad77300da to your computer and use it in GitHub Desktop.
hello world with puma
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'puma'
end
require 'puma/configuration'
# literally a rack app
app = ->(env) { ['200', {'Content-Type' => 'text/html'}, ['Hello, World!']] }
config = Puma::Configuration.new({}) do |user_config, _|
user_config.app(app)
user_config.port(3000)
end
Puma::Launcher.new(config).run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment