From d83fcbe9c5045f6dafcb04b2605fbd9272b0850b Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Fri, 15 Jun 2012 00:32:06 -0400 Subject: [PATCH] Static file serving, yaaaay. --- math-replay/Makefile | 5 ++++- math-replay/config.ru | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 math-replay/config.ru diff --git a/math-replay/Makefile b/math-replay/Makefile index 4457235..dbf8783 100644 --- a/math-replay/Makefile +++ b/math-replay/Makefile @@ -19,4 +19,7 @@ clean: rm -vf $(ALL) -.PHONY: all clean +serve: + rackup ./config.ru + +.PHONY: all clean serve diff --git a/math-replay/config.ru b/math-replay/config.ru new file mode 100755 index 0000000..203d1ce --- /dev/null +++ b/math-replay/config.ru @@ -0,0 +1,6 @@ +#!/usr/bin/env rackup +use Rack::ContentLength +root = File.expand_path('./algebra', File.dirname(__FILE__)) +app = Rack::Directory.new(root) +puts "Serving #{root} (see --help for options)" +run app