Code Monkey home page Code Monkey logo

trinidad's Introduction

trinidad

Trinidad allows you to run a rails or rackup applications within an embedded Apache Tomcat container.

This project was initially called “Tomcat-rails” but due to legal issues with the ASF and the Tomcat trademark it has been renamed.

INSTALL:

jgem install trinidad

USAGE:

Rails applications:

$ cd myrailsapp
$ jruby -S trinidad

Rack applications:

$ cd myrackapplication

$ jruby -S trinidad -r path_to_rackup/rackup_file

or if the name of the file is config.ru

$ jruby -S trinidad -r path_to_rackup

or if config.ru is in the base directory

$ jruby -S trinidad -r

or if config.ru is under the directory WEB-INF

$ jruby -S trinidad

CONFIGURATION:

Trinidad allows you to configure some parameters when the server is started from the command line, the following is a list of the currently supported options:

* -p, --port PORT             =>  port to bind to.
* -e, --env ENVIRONMENT       =>  rails environment.
* -c, --context CONTEXT       =>  application context path.
* --lib, --jars LIBS_DIR      =>  directory containing jars.
* --classes CLASSES_DIR       =>  directory containing classes.
* -r, --rackup [RACKUP_FILE]  =>  run a provided rackup file instead of a rails application, by default it's config.ru.
* --public PUBLIC_DIR         =>  specify the public directory for your application, by default it's 'public'.
* -t, --threadsafe            =>  shortcut to work in threadsafe mode. Setting jruby_min_runtimes and jruby_max_runtimes to 1 in the configuration file the server behaves as the same way.
* -l, --load EXTENSION_NAME   =>  loads an extension to use its command line options.

The server can also be configured from a yaml file. If a file is not especified, the server tries to load the file config/trinidad.yml. Within this file you can add other options like jruby.min.runtimes(:jruby_min_runtimes) or jruby.max.runtimes(:jruby_max_runtimes).

jruby -S trinidad -f
jruby -S trinidad --config my_custom_configuration.yml

You can also specify a default web.xml to config your web application. By default the server tries to load the file config/web.xml but you can modify this path adding the option default_web_xml within your configuration file.

Other advanced options can be found in the wiki: wiki.github.com/calavera/trinidad/advanced-configuration

EXTENSIONS:

From the version 0.8.0 Trinidad allows to extend the server with more Tomcat features, here there is a list with the current available extensions:

You can find further information on how to write your own extension in the wiki: wiki.github.com/calavera/trinidad/extensions

Copyright © 2010 David Calavera<[email protected]>. See LICENSE for details.

trinidad's People

Contributors

calavera avatar elskwid avatar nitaigao avatar

Stargazers

Chris Samuel avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.