Search code examples
javascriptnode.jsnpmtail

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 https://www.npmjs.com/package/tail-http and in this page it clearly says it is operated:

tail-http http://example.com/some-file.log

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 http://example.com/some-file.log

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

What am I missing?


Solution

  • npm install -g tail-http

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