Skip to content

Instantly share code, notes, and snippets.

@j1n6
Created January 3, 2013 21:59
Show Gist options
  • Save j1n6/4447765 to your computer and use it in GitHub Desktop.
Save j1n6/4447765 to your computer and use it in GitHub Desktop.
task :server do
# optional port parameter
port = ENV['PORT'] ? ENV['PORT'] : '3000'
puts 'start unicorn development'
# execute unicorn command specifically in development
# port at 3000 if unspecified
sh "cd #{Rails.root} && RAILS_ENV=development unicorn -p #{port}"
end
# an alias task
task :s => :server
@thiyagarajan
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment