Friday, March 1, 2013

Why I hate node-gyp

Today I had to install a node module of mine in a sandboxed environment (i.e. isolated from the system directories) and due to node-gyp what usually is just a matter of time turned into a nightmare.

One liner http server

Since the day a friend of mine introduced me to nodejs, I now use it for all kind of daily stuff.
Today I had to troubleshoot connections behind a firewall. This easy node one-liner helped me do that:

$ node -e 'require("http").createServer(function(req, res){ console.log("Got request"); res.end((new Date) + ""); }).listen(3001);'