Last active
October 14, 2018 18:35
-
-
Save lfv89/ba8ad9180ab720cce482dbaad77300da to your computer and use it in GitHub Desktop.
hello world with puma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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