LoginSignup
5
6

More than 5 years have passed since last update.

Pow

Last updated at Posted at 2013-09-20

マニュアル
http://pow.cx/manual.html

nodeアプリを実行

ポート3000番で動作してるとして、以下を実行。

% echo 3000 > ~/.pow/nodeapp

http://nodeapp.dev/ でアクセスできる。

同じLAN内の別PCからアクセスする

http://appname.dev/ なら
http://appname.192.168.0.2.xip.io/ とかで。

Rails 一時的にproductionにする

.powenvファイルを作る

#{Rails.root}/.powenv
export RAILS_ENV=production

Apacheと共存する

毎回 powder down, powder up するという方法があるが面倒。
http://thelucid.com/2012/03/11/using-both-pow-and-apache-on-osx-lion/

マニュアルに設定方法がのってある。

まず、Apacheの proxy_module と proxy_http_module が有効でなければ、有効にする。

次に Running Pow with Apache に書いてある通りに、以下をガガッと実行

$ curl get.pow.cx/uninstall.sh | sh #if you have pow installed
$ echo 'export POW_DST_PORT=88' >> ~/.powconfig
$ sudo curl https://raw.github.com/gist/1058580/zzz_pow.conf -o /private/etc/apache2/other/zzz_pow.conf
$ sudo apachectl restart
$ curl get.pow.cx | sh

以上でOKです。

途中、

[warn] proxy: No protocol handler was valid for the URL /portal. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

こんなエラーが出ましたが、proxy_http_module が有効になってないだけでした。

powder

便利なやつ

$ gem install powder
$ cd /path/to/rails/
$ powder link
5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6