Posts in Category: node js

Authentication using Google’s oAuth api with node.js

OAuth authentications are pretty popular now a days and another thing which is popular is JavaScript. This article shows how to plugin google’s oAuth api for authentication in your own node application. The github repo is also available. A background of oAuth OAuth is an authentication technique which provides you a secure

Read More

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