Posts in Category: node js

Get working directory name and file name in Node

__dirname : full directory path __filename: exact file location Node provides two variables named “__dirname” and “__filename” who returns the directory path of the currently executing file and the exact location of the file respectively. Both of them return string. To know in depth go through the following. Get working directory path We can

Read More



Node environment vs Browser environment

Node and web browsers, both executes JavaScript, but Node does that in server side and browsers in client side. Node uses the same JavaScript engine which is the backbone of Chrome, but still we can find few differences between Node and Browser. Node Browser ¬†Node doesn’t have a predefined “window” object cause it

Read More




Node.js – reasons to use, pros and cons, best practices!

JavaScript has certain characteristics which makes it unique from the other dynamic languages. It has no concept of thread, but its model of concurrency is completely basing on events; i.e. it’s an event driven programming language. The same thing makes node server different than other web servers. This article describes what

Read More