node

Bufferクラスから16進数の文字列を取り出す

APNs=Apple Push Notification serviceを叩いてたら、エラーのコールバックでBufferクラスなるものでtoken が帰ってきた。無知すぎるのでggり、もとのtokenの文字列にしたいんだけど var token = notification.device['token'] console.log(token.toString(…

nodeでAPIサーバーをつくろうとおもった時のメモ

nodeでシンプルなAPIサーバーはどう作るのが( ・∀・)イイ!!んだろう ってことでとりあえず2つの方法でやってみました。 とりあえずAPIインターフェースをどう作るかが目的なので、RESTful*かどうかは置いときます。 *RESTfulなAPIって?→連載:ASP.NET Web API…

compoundJSをinstallしようとしたらnpmが古くてハマった件

sudo npm install compound -g とやるとエラー。。 $ sudo npm install compound -g Password: npm http GET https://registry.npmjs.org/compound npm http 304 https://registry.npmjs.org/compound npm http GET https://registry.npmjs.org/compound/-/c…