Sha256: 9e0686416def55fcd8e8423998d05672e10f28e7b03f1f65713cedf58c1a71b5
Contents?: true
Size: 858 Bytes
Versions: 7
Compression:
Stored size: 858 Bytes
Contents
namespace :mack do namespace :server do desc "Starts the webserver." task :start do |t| require 'rubygems' require 'optparse' require 'optparse/time' require 'ostruct' require 'fileutils' require 'thin' options = OpenStruct.new options.port = (ENV["PORT"] ||= "3000") # Does NOT work with Thin!! You must edit the thin.yml file! options.handler = (ENV["HANDLER"] ||= "thin") # require File.join(Mack.root, "config", "boot.rb") require 'mack' if options.handler == "thin" # thin_opts = ["start", "-r", "config/thin.ru"] thin_opts = ["start"] Thin::Runner.new(thin_opts.flatten).run! else Mack::SimpleServer.run(options) end end # start end # server end # mack alias_task :server, "log:clear", "mack:server:start"
Version data entries
7 entries across 7 versions & 1 rubygems