andyyoung01 / keys-values-app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keys and Values App

此repository是Apache Mesos(7)-Marathon的高级应用的示例代码。对Mesos in Action的keys-values-app的Bundle源进行了替换,替换为阿里云镜像,使国内下载速度更快。

A simple Ruby web application (implemented using the Sinatra framework) that stores key/value pairs in a Redis database.

Prerequisites

Each of the machines running this web app must have the following already installed:

  • Ruby - tested with versions 1.9.3, 2.0.0, and 2.1.5
  • Bundler - tested with version 1.8.4

Usage

The listening port for the application will use the environment variable $PORT, as set by Marathon. If the variable isn't set, it will fallback to 8080.

Furthermore, the following environment variables must be set:

  • REDIS_HOST
  • REDIS_PORT

Install the necessary Ruby gems:

$ bundle install

Run the app:

$ bundle exec ruby app.rb

About


Languages

Language:HTML 61.6%Language:Ruby 33.8%Language:CSS 4.6%