Blog Archives

Try-Catch to catch uncaught errors

Tweet The first thing that comes to the mind about handling uncaught errors is to use the try-catch on operations that are likely to throw a data error. process.nextTick(function() { try { get_data(); } catch(err) { console.log(err); res.send(500, 'Oops!'); }

Posted in Express, Node.Js Tagged with: ,

Error Handling in Node js

Tweet Error handling is a pain, and it’s easy to get by for a long time in Node.js without dealing with many errors correctly. But building robust Node.js(Node js) apps requires dealing properly with errors, and it’s not hard to

Posted in Express, Node.Js Tagged with: ,

Template engine Jade

Tweet Templates allow you to split your presentation information out from your program code,making it easier to arrange your project files and render out web pages with complicated structure. I am using jade template for this. To install the Jade

Posted in Express, Node.Js Tagged with: ,

Express Application

Tweet A simple and small practical server built using Express. To begin, the variable app is initialized by calling the express() function from the express library. The require command instructs Node to import the library express and assign it to

Posted in Express, Node.Js Tagged with: ,

Strict Mode In A Browser

Tweet Modern browsers have a “strict” mode that you can enable with a very simple command: “use strict”.This is done for backward compatibility reasons with older browsers. When “use strict” is set inside of a function, that function is said

Posted in Javascript, Node.Js Tagged with: ,

Debugging memory leaks in nodejs ?

Tweet Debugging memory leaks in nodejs This is a quick tutorial for debugging memory leaks in nodejs. Step 1: Install the debugging tools First of all, you need to install the v8-profiler module. Without that required from within your app,

Posted in Node.Js Tagged with:

Alert javascript?

Tweet The alert() method displays an alert box with a specified message and an OK button.An alert box is often used if you want to make sure information comes through to the user.If you are getting bored with the built

Posted in Javascript, Node.Js Tagged with:

Create self-signed SSL certificate in Ubuntu

Tweet What is SSL Certificate? SSL is an acronym for Secure Sockets Layer. SSL Certificates are small data files that digitally bind a cryptographic key to an organisation’s details. It creates an encrypted connection between your web server and your

Posted in Node.Js Tagged with: , ,

Https Server Express ?

Tweet Node.js provides HTTP server as one of the core libraries. So there is no need for a separate HTTP server. But if you are developing any application in node.js which needs secure transactions then HTTPS server is necessary for

Posted in Node.Js Tagged with:

HTTPS server (SSL) Implementation in node.js

Tweet Node.js provides HTTP server as one of the core libraries. So there is no need for a separate HTTP server. But if you are developing any application in node.js which needs secure transactions then HTTPS server is necessary for

Posted in Node.Js Tagged with: