From d3626cac35eb559e19a9179f950ac5f55182497e Mon Sep 17 00:00:00 2001 From: Tomohiko Himura Date: Sat, 19 Dec 2015 11:04:41 +0900 Subject: [PATCH] Add boot web server command `rake server` --- Rakefile | 5 +++++ bin/rackup | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 bin/rackup diff --git a/Rakefile b/Rakefile index 9c36828..5219dfe 100644 --- a/Rakefile +++ b/Rakefile @@ -6,3 +6,8 @@ RSpec::Core::RakeTask.new(:spec) YARD::Rake::YardocTask.new task :default => :spec + +desc 'boot web server' +task :server do + sh "bin/rackup -o 0.0.0.0 -p $PORT" +end diff --git a/bin/rackup b/bin/rackup new file mode 100755 index 0000000..8cc9953 --- /dev/null +++ b/bin/rackup @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'rackup' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('rack', 'rackup')