debugging node code

if we want to run node in a debug mode we can simply run node debug <nodeScriptFileName> And if we put debugger command inside the script then it will stop in those location and allow us to choose what to do: for continue. cont c next n for step in step s  for step out … Continue reading debugging node code

Advertisements

Allowing process to bind to port lower than 1024 in Linux

In Linux by default process  has no permission to bind themselves to any port lower than 1024 (unless you are the root user of course). So if for example we want our node js application to listen on port 80, the default port for http, we will probably get the following exception: events.js:160 throw er; … Continue reading Allowing process to bind to port lower than 1024 in Linux