From 4b69d8963b0f52261a973e765e96b3c743a792d0 Mon Sep 17 00:00:00 2001 From: Nicolas Fricke Date: Fri, 24 Nov 2017 15:08:14 +0100 Subject: [PATCH] Add `config.ru` file to start via `rackup` This also allows the server to be deployed to Heroku --- README.md | 2 +- config.ru | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 config.ru diff --git a/README.md b/README.md index 0b69352..3a9133c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Simple web-app using [`article_json`](https://github.com/Devex/article_json) to 1. Run `bundle install` to install all required dependencies 1. Run `bundle exec ruby bin/setup.rb` and follow the instructions to set up your environment -1. Execute `bundle exec ruby app/server` to start the server +1. Execute `bundle exec rackup -p 4567 config.ru` to start the server 1. You should be able to open the webapp via `http://localhost:4567` in your browser ## Running the tests diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..1d0388b --- /dev/null +++ b/config.ru @@ -0,0 +1,2 @@ +require_relative 'app/server' +run Sinatra::Application