Sahajahan

Sahajahan

I am Sahajahan, a coder. Love to learn and share. Total experience of 5+ years in IT. Worked in multiple areas like Service Virtualization, Web development, Automation.
Node callback

What is Callback in Node.js?

A lot of people get confused with the callback concepts. Here is the small topic to make you understand about the callback and uses Node world. It is very simple. Due to this feature, Node.js has captured the market so fast. Let’s discuss. In Synchronous programs, the code executes line by line. After finishing the execution of the current line, then moves to the next line. If any line contains a method which takes time to execute (it might be I/O…

1
Read More

FTP deployment to or update a website using Gulp

This post is about getting familiar with the few of the Gulp operations and FTP deployment to a web server using it. As a developer, we have some challenges to manage the process of development and deployment to a different server. There are few of the techniques in Gulp, which can handle your hectic tasks pretty easily and make our life easy in the developments. When we try to develop the new application or update a legacy application, we need…

0
Read More

Use of console.time() and console.timeEnd() method in javascript

Sometimes we wonder about some code, we have just written, how it is performing. In JavaScript, we have a console object. This console object can provide you answer on performance. Console object has two methods named as time() and timeEnd(). These two methods take requires a string argument, which will name of the timer. It is generally used at the time of testing the code. Below is the syntax: For Example, We want to test a portion of a code…

0
Read More

Chat application using Node.js

Some point in time, while using social platforms we think how this chat window works. It is pretty simple. Here is sample demo application which will show how the chat window works in Node.js. We will be using the socket.io module for communication between chat windows. You can read about the ‘socket.io’ from https://socket.io/ .   Node.js: It should be installed. Express js: As it is a web application we will require the express module. if you want to read…

0
Read More

How to execute jar file using node js child_process

Many of the situation we need to interact with the other programs. Here is a small demo on how to invoke or execute the jar. In Node js, the “child_process” is the module which will do the needful. Through chlid_process, we can execute OS command. Here have used one java program which takes input from the command line and prints the value which is in command line execution. Below is the java program we have used. We will create an…

2
Read More
mysql-db

Insert multiple/bulk records into mysql DB using node.js

Some cases we get requirements for bulk data insertion to MySQL database. It is a simple process. In this tutorial, we will learn about how to handle multiple rows or arrays of data insertion. Below are the steps to guide archive the target.   Node Js: It should be installed in your system. Below are the processes to set up the project, 1. Create project folder(here it is “mysql-bulkinsert-opration”) 2. Navigate to the folder using the command line (cmd)

4
Read More
log-error

Design custom logger for node js appilication

When designing a web application, we require some information need to be captured. It may be for future reference and analysis to find the root cause of some issue. Designing the Logging module intelligently will help these activities in future. Here we will talk about simple custom logging technique, which you can use and customize as per your requirement of logging. Node Js: It should be installed in your system. express-generator: You need to install express-generator, this will help you…

0
Read More
commadline-image-banner

How to read command line arguments in node js

When we are designing any generalized program, in some cases we need to pass data from the command line. A simple example may be a calculator, which takes input from the command line and prints the output in the console. Reading a command line data is a basic and simple task in Node.js. When we run the program, all the arguments received from the command line is set to “process.argv” property. Process is a global object. If you want to…

0
Read More
upload

File Uploader using Node js

In this rapidly changing world, we will get a different kind of requirements or demands to complete a certain activity. Sometimes we will get a requirement like an upload a text file or image or word file to the server. To solve these kinds of requirement, we need a file uploader code to carry out the activity. Here in this tutorial, we will learn about the file uploader. This tutorial will offer you how to upload any kind of file…

0
Read More

Implementation of Queue in JavaScript

With the introduction of Node Js, a new era has been started for Javascript. A massive and continuous growth in JavaScript implementation and concepts is on. It has taken become one of the major languages in web design and development. Node.js is a very powerful JavaScript-based framework/platform built on Google Chrome’s JavaScript V8 Engine. It is used to develop I/O intensive web applications like video streaming sites, single-page applications, web etc.

2
Read More