Skip to content

Instantly share code, notes, and snippets.

@stefansundin
Last active August 10, 2016 05:48
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 stefansundin/49ece4d75524ffc697a79babd058e89d to your computer and use it in GitHub Desktop.
Save stefansundin/49ece4d75524ffc697a79babd058e89d to your computer and use it in GitHub Desktop.
Use rack to host a static website.
#\ -w -p 3000
use Rack::Static, urls: [""], root: "public", index: "index.html"
run ->{}
# run "bundle", then "rackup", put files in a directory named "public", then open http://localhost:3000/
# python alternative:
# python -m SimpleHTTPServer
source "https://rubygems.org"
gem "rack"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment