albfan albfan - 1 year ago 74
Javascript Question

Using node js from command line

I'm totally newbie on node.js so let me explain what I'm trying to do:

I want to install tail-http and in this page it clearly says it is operated:


After install node and npm I cannot install it an use it as a new command, The far I get was:

$ npm init
$ npm install tail-http
$ cd node_modules
$ cd tail-http
$ node index.js

That works, but is far from the simple usage expose on that web.

What am I missing?

Answer Source

npm install -g tail-http

will install it globally and you could use it anywhere then.