This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin default | |
ServerName nodejs.localhost | |
ProxyPass / balancer://ourexamplecluster | |
ProxyPassReverse / balancer://ourexamplecluster | |
<proxy balancer://ourexamplecluster ourexamplecluster=""> | |
BalancerMember http://127.0.0.1:8000 | |
</proxy> | |
</virtualhost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "appname" | |
set :deploy_to, "/var/www" | |
set :scm, :git | |
set :repository, "[email protected]:user/app.git" | |
default_run_options[:pty] = true | |
set :user, "www-data" | |
set :domain, "foo.tld" | |
set :normalize_asset_timestamps, false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Tiny tokenizer | |
* | |
* - Accepts a subject string and an object of regular expressions for parsing | |
* - Returns an array of token objects | |
* | |
* tokenize('this is text.', { word:/\w+/, whitespace:/\s+/, punctuation:/[^\w\s]/ }, 'invalid'); | |
* result => [{ token="this", type="word" },{ token=" ", type="whitespace" }, Object { token="is", type="word" }, ... ] | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
get '/' do | |
"Hello world" | |
end |