Skip to content

Instantly share code, notes, and snippets.

@smreed
Created August 11, 2009 03:35
Show Gist options
  • Save smreed/165609 to your computer and use it in GitHub Desktop.
Save smreed/165609 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
get '/' do
"Hello from Sinatra running on Java!"
end
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>YOUR-APPLICATION-ID</application>
<version>1</version>
<static-files />
<resource-files />
<sessions-enabled>false</sessions-enabled>
<system-properties>
<property name="jruby.management.enabled" value="false" />
<property name="os.arch" value="" />
<property name="jruby.compile.mode" value="JIT"/> <!-- JIT|FORCE|OFF -->
<property name="jruby.compile.fastest" value="true"/>
<property name="jruby.compile.frameless" value="true"/>
<property name="jruby.compile.positionless" value="true"/>
<property name="jruby.compile.threadless" value="false"/>
<property name="jruby.compile.fastops" value="false"/>
<property name="jruby.compile.fastcase" value="false"/>
<property name="jruby.compile.chainsize" value="500"/>
<property name="jruby.compile.lazyHandles" value="false"/>
<property name="jruby.compile.peephole" value="true"/>
</system-properties>
</appengine-web-app>
require 'rubygems'
require 'sinatra'
root_dir = File.dirname(__FILE__)
set :environment, :development
set :root, root_dir
set :app_file, File.join(root_dir, 'app.rb')
disable :run
require 'app'
run Sinatra::Application
Warbler::Config.new do |config|
config.staging_dir = 'app'
config.gems = ['sinatra']
config.dirs = []
config.gem_dependencies = true
config.webxml.booter = :rack
config.webxml.jruby.min.runtimes = 1
config.webxml.jruby.max.runtimes = 1
config.webxml.jruby.init.serial = true
config.java_libs = []
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment