0

What's the simplest way to run a static server without trailing slashes locally? Ideally, I'd simply like to only use tools that come installed with the latest version of OS X.

Unfortunately,

python -m SimpleHTTPServer 8000

and

ruby -run -ehttpd . -p8000

both 301 redirect /about to /about/.

I want the opposite.

See more static server one-liners.

Note: My static site talks to a REST API that uses Rack.

ma11hew28
  • 121,420
  • 116
  • 450
  • 651

1 Answers1

0

Unless someone has a better solution, use Rack::Static.

True, Rack doesn't come installed with the latest version of OS X, but you need it anyway to run the REST API that your static site talks to.

See Heroku Dev Center: Creating Static Sites in Ruby with Rack.

Please update this answer with your completed code. Thanks!

ma11hew28
  • 121,420
  • 116
  • 450
  • 651