Node.js

Heroku の Node.js アプリで Redis を使用する方法

https://devcenter.heroku.com/articles/getting-started-with-nodejs#using-redis の言う通りにやる。それだけ。 Redis To Go を使うのだからhttps://devcenter.heroku.com/articles/redistogo#using-with-node を見た方がいいんじゃないかと最初は思ったの…

Node.js (Express) でuncaughtException が起きた時にエラーページを表示する

Node.js で予期せぬエラー uncaughtException が起きた時にサーバを止めないためには process.on('uncaughtException', function(err) { console.log(err); }); としてエラーをキャッチしてサーバを止めないようにするというのは一般的に知られた方法である…

Heroku の Node.js アプリで MongoDB を使用する方法

Heroku で Node.js のアプリケーションを作る際にデータベースを使用する際に MongoDB を使用する事が多いので。 http://gihyo.jp/dev/serial/01/nodejs/0005 を参考にやってみた。 MongoDB をインストールしてないようならbrewでインストール brew install …