{"id":15468514,"url":"https://github.com/geekq/jetty-rackup","last_synced_at":"2025-07-13T13:40:37.144Z","repository":{"id":665761,"uuid":"308877","full_name":"geekq/jetty-rackup","owner":"geekq","description":"Runs a rack conform application inside jetty web server","archived":false,"fork":false,"pushed_at":"2013-05-28T15:57:42.000Z","size":6756,"stargazers_count":44,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T22:54:39.516Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geekq.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-09-16T14:08:14.000Z","updated_at":"2021-07-21T19:13:29.000Z","dependencies_parsed_at":"2022-07-07T18:40:22.891Z","dependency_job_id":null,"html_url":"https://github.com/geekq/jetty-rackup","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/geekq/jetty-rackup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekq%2Fjetty-rackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekq%2Fjetty-rackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekq%2Fjetty-rackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekq%2Fjetty-rackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geekq","download_url":"https://codeload.github.com/geekq/jetty-rackup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geekq%2Fjetty-rackup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265151840,"owners_count":23719123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T01:41:26.749Z","updated_at":"2025-07-13T13:40:36.604Z","avatar_url":"https://github.com/geekq.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"jetty-rackup\n============\n\nFor the newer projects we decided to switch from MRI to JRuby.  One of\nthe bigger questions is certainly the deployment.\n\nReading and trying all the warbler stuff, we had enough of packaging and\nwanted to do it the Ruby/Sinatra way (with a standalone script, where\none can consciously start things like `run Sinatra::Application` from a\nrackup script).\n\nEmbedding jetty is also mentioned in the jetty documentation \"For many\napplications, HTTP is just another interface protocol.  Jetty can easily\nbe embedded in such applications and products without adopting a WWW\ncentric application architecture.\"\n\nSo here is the solution:\n\n* write your Rack based application as usual\n* create a rackup script `config.ru` as usual; there is more information in\n  the official tutorial\n  \u003chttps://github.com/rack/rack/wiki/(tutorial)-rackup-howto\u003e\n* install jetty-rackup (this project), e.g.\n  `gem install jetty-rackup` or\n  `git clone git://github.com/geekq/jetty-rackup.git`\n* from your application folder run `jetty-rackup`. You can also provide\n  a path to non-standard rackup-script and the desired port\n  number for the server to run.\n\nNow your application runs inside jetty servlet container. Enjoy!\n\n\nExample\n-------\n    $cat config.ru\n\n    #\\ -p 8765\n    require 'rubygems'\n    gem 'sinatra', '\u003e= 1.0.0'\n    require './my_app.rb'\n    set :run, false # disable built-in sinatra web server\n    set :environment, :development\n    set :base_url, 'http://xxtrial' # custom application option\n    run Sinatra::Application\n\n\nBinaries\n--------\nThe jetty and jruby-rack binaries are now provided for your convinience.\nBut you can also download a different version of them, if you wish, from\nthe official web sites of the respective projects:\n\n* \u003chttp://jetty.codehaus.org/jetty/\u003e\n* \u003chttp://kenai.com/projects/jruby-rack/pages/Home\u003e\n\nThe major gem version (7) now matches the used jetty version.\n\nFAQ\n---\n\n\u003e What's the best way to set max memory?\n\n    jruby -J-Xmx2048m  /usr/local/lib/jetty-rackup/jetty-rackup config.ru\n\nTests\n----\n\nThere are no automated tests for jetty-rackup. But there are some\nexample applications with rackup configuration. Just cd to the\nparticular example directory and run. E.g.\n\n    cd examples/just_ruby/\n    jetty-rackup\n    firefox http://localhost:9292/stranger\n\njetty-rackup uses `config.ru` file from the current directory by\ndefault.\n\nWhat's new\n----------\n* 7.2.0\n  + Add support for `Host` option. In addition to specifying port\n    now a host ip can also be specified if e.g. you only wish to bind the\n    server only to the loopback interface 127.0.0.1 and not to all IPs.\n  + Add support for `pid` option - create pid file\n\nSee also\n--------\nFor Rails deployment you may prefer jetty-rails\n\u003chttp://jetty-rails.rubyforge.org/\u003e\n\n\nCopyright\n---------\n(c) 2009 Vodafone Group Services GmbH\n\n(c) 2013 Vladimir Dobriakov\n\n\nAuthor\n------\nVladimir Dobriakov\n\u003chttp://blog.geekq.net\u003e, \u003chttp://www.mobile-web-consulting.de\u003e\n\nWith contributions by [Leandro Silva](http://leandrosilva.com.br/),\nJason Rogers and erdeszt.\n\nFurther Credits\n---------------\n* Michal Hantl for the first working jetty based 'Hello world'\n  application. \u003chttp://michal.hantl.cz/\u003e\n* Nick Sieger for the explanation of servlet context init params and of \n  course jruby-rack itself. \u003chttp://blog.nicksieger.com/\u003e\n* Thanks to [Nik](https://github.com/11xor6) for the Jetty 7.0 port.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekq%2Fjetty-rackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekq%2Fjetty-rackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekq%2Fjetty-rackup/lists"}