タグ

nodeに関するgfxのブックマーク (5)

  • GitHub - chalk/chalk: 🖍 Terminal string styling done right

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

    GitHub - chalk/chalk: 🖍 Terminal string styling done right
    gfx
    gfx 2017/07/14
    nodejs cli toolsの出力をカラフルにするやつ。
  • npm-scriptに書くコマンドについて - 四角革命前夜

    Noderは、よくnpm testとかでテストを簡単に実行するために、package.jsonにscriptsを書いていると思います。 で、今まではpackage.jsonに "scripts": { "test": "./node_modules/.bin/mocha" } と書いてたのですが、Building CLI Tools with Node.jsを最後まで読んだところ、 "scripts": { "test": "mocha" } でも動作するというのを知りましたorz 上記でローカルにインストールしたmochaが実行できます。 Windowsだとmocha.cmdを実行しないといけないですが、この記法だとそういうのもやってくれるみたいです。 いつからこの記法出来るようになったんですかねえ…… ってかなり初期から一番上の書き方しか知らなかったのでもしかしたら最初からできてたのか

    npm-scriptに書くコマンドについて - 四角革命前夜
    gfx
    gfx 2013/06/29
  • node-ncurses で日本語をつかおう! - tokuhirom's blog

    こんにちは、金曜日の担当、素敵なレディーこと tokuhirom です。 node-ncurses で日語をつかう方法のマトメです。node-ncurses は通常、日語がつかえません。それはちょっとこまるので、いくつかの hack をおこない、なんとかしました。 setlocale(3)の発行(node-setlocale)ncurses で日語をつかう場合には setlocale(3) を発行する必要があるからです。setlocale(3) を発行できそうな node.js のモジュールはみあたらないので、つくりました。 それが node-setlocale です。↓ http://blog.64p.org/entry/2012/07/26/180115

  • Node.js で重い処理をしてしまったときにタイムアウトするの法 - tokuhirom's blog

    (この記事は Node.js アドベントカレンダー不参加記事です) チャットサーバー的な使い方とか意外とみんな興味なくて、普通のウェブアプリケーションなどをかく、という用途にちょっと node.js がつかえたらいいのにな、とおもっている人がおおいようにかんじています。Node.js が人気なのは、v8 をうまくパッケージングしているのが node.js ぐらいで、そして v8 をうまくパッケージングするのが結構めんどくさいから、というところが大きいのです。ぶっちゃけ node.js が〜 とさわいでる人のうち8割は I/O multiplexing だからとかそういう理由で支持しているわけではなかったりするのです(偏見)。 さて、普通の web application のようなものを書こうとしたときに Node.js って基シングルスレッドだし、なんかうっかり重い処理したときにどうした

    gfx
    gfx 2011/12/13
  • DIY node.js server on Amazon EC2

    By cuppster / 2011-05-12 I'm involved with a project where our ruby/rails developer dropped out, so I decided to take on the job using node.js (rather than learn rails). We initially were using services from dotCloud, but it was too flakey from day to day and our demo was coming up. For hosting, Amazon's EC2 was the obvious candidate, but I'd have to setup and provision the entire server from scra

  • 1