Created
August 3, 2015 17:50
-
-
Save aliou/93ce2fc79e5492d6aa53 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'rubygems' | |
require 'bundler' | |
Bundler.require(:default) | |
require './hooks' | |
run Hooks |
This file contains hidden or 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
source 'https://rubygems.org' | |
ruby '2.2.2' | |
gem 'sinatra' |
This file contains hidden or 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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
rack (1.6.4) | |
rack-protection (1.5.3) | |
rack | |
sinatra (1.4.6) | |
rack (~> 1.4) | |
rack-protection (~> 1.4) | |
tilt (>= 1.3, < 3) | |
tilt (2.0.1) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
sinatra | |
BUNDLED WITH | |
1.10.5 |
This file contains hidden or 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' | |
require 'json' | |
post '/' do | |
data = JSON.parse(request.body.read) | |
puts data | |
end |
This file contains hidden or 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 the working application directory | |
# working_directory "/path/to/your/app" | |
working_directory "/var/www/my_app" | |
# Unicorn PID file location | |
# pid "/path/to/pids/unicorn.pid" | |
pid "/var/www/my_app/pids/unicorn.pid" | |
# Path to logs | |
# stderr_path "/path/to/logs/unicorn.log" | |
# stdout_path "/path/to/logs/unicorn.log" | |
stderr_path "/var/www/my_app/logs/unicorn.log" | |
stdout_path "/var/www/my_app/logs/unicorn.log" | |
# Unicorn socket | |
# listen "/tmp/unicorn.[app name].sock" | |
listen "/tmp/unicorn.myapp.sock" | |
# Number of processes | |
# worker_processes 4 | |
worker_processes 2 | |
# Time-out | |
timeout 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment