Skip to content

Instantly share code, notes, and snippets.

@grimen
Created August 24, 2012 20:25
Show Gist options
  • Save grimen/3455253 to your computer and use it in GitHub Desktop.
Save grimen/3455253 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'pow_proxy'
# 1. cd <this_node_project>
# 2. gem install powder pow_proxy
# 3. echo <this_file> > ./config.ru
# 4. NODE_PORT=8888 npm start
# 5. powder link hejhopp
# 6. open hejhopp.dev
#
# ...eller lägg in en hejhopp.com manuellt i /etc/hosts (pow kör med .dev)
domain = `cat ./.powder`
domain = domain ? "#{domain}.dev" : "hejhopp.com"
map "/some/path/i/want/override/locally.js" do
run PowProxy.new(:host => '127.0.0.1', :port => 8888) # custom
end
map '/' do
run PowProxy.new(:host => domain, :port => 80) # production
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment