Browse files

use less common environment variables for configuration

  • Loading branch information...
1 parent 888adb6 commit 22c378bc581cd00d2d0d3d4f2d37f329e50ecd65 @stve committed Nov 11, 2011
Showing with 5 additions and 5 deletions.
  1. +1 −1 Readme.md
  2. +2 −2 lib/pow_proxy.rb
  3. +2 −2 spec/pow_proxy_spec.rb
View
2 Readme.md
@@ -22,7 +22,7 @@ require 'pow_proxy'
run PowProxy.new(:host => '127.0.0.1', :port => 8080)
```
-You can also set the host and port by exporting the `HOST` and `PORT` environment variables in your `.powenv`.
+You can also set the host and port by exporting the `POW_PROXY_HOST` and `POW_PROXY_PORT` environment variables in your `.powenv`.
Make sure your node app is running, symlink your app so that Pow knows about it and you'll be all set.
View
4 lib/pow_proxy.rb
@@ -8,8 +8,8 @@ class PowProxy
attr_reader :host, :port
def initialize(options = {})
- @host = options.delete(:host) || ENV['HOST'] || DEFAULT_HOST
- @port = options.delete(:port) || ENV['PORT'] || DEFAULT_PORT
+ @host = options.delete(:host) || ENV['POW_PROXY_HOST'] || DEFAULT_HOST
+ @port = options.delete(:port) || ENV['POW_PROXY_PORT'] || DEFAULT_PORT
end
def call(env)
View
4 spec/pow_proxy_spec.rb
@@ -33,8 +33,8 @@
context 'ENV' do
before do
- ENV['HOST'] = 'monk.local'
- ENV['PORT'] = '8080'
+ ENV['POW_PROXY_HOST'] = 'monk.local'
+ ENV['POW_PROXY_PORT'] = '8080'
@proxy = PowProxy.new
end

0 comments on commit 22c378b

Please sign in to comment.