Skip to content

Instantly share code, notes, and snippets.

@eterps
Last active Dec 29, 2019
Embed
What would you like to do?
Attempt to deploy something simple to zeit.co
mkdir rubytest
cd rubytest
mkdir api
cat <<END >api/index.rb
require 'cowsay'
Handler = Proc.new do |req, res|
res.status = 200
res['Content-Type'] = 'text/plain'
res.body = Cowsay.say('hello world', 'cow')
end
END
cat <<END >Gemfile
source "https://rubygems.org"
gem "cowsay", "~> 0.3.0"
END
bundle install
now
curl https://rubytest.$ZEIT_USERNAME.now.sh # This returns a directory index, not a Cowsay hello world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment