#!/usr/bin/env jruby $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') require 'rubygems' require 'thin' require 'sinatra' require 'hope' require 'hope/server' EM::run { Kernel.trap("INT") { puts "Got INT signal"; EM.stop; exit(0) } Kernel.trap("TERM") { puts "Got TERM signal"; EM.stop; exit(0) } Hope::configure(ARGV[0]) unless ARGV[0].nil? Hope::Server::App.run! }