JavaScript: Converting a Callback to Promises

Callbacks For JavaScript to know when an asynchronous operation has returned a response (the response could be an correct result or error response), it points to a function that will be executed once that result is ready. This function is what we call a “callback function”. In a simple way, a callback is a function that … Continue reading JavaScript: Converting a Callback to Promises

Advertisements

JavaScript – Reading Excel file using node.js! Solved!

This post will show you how can you access the data in your excel sheet(.xlsx) file from your node.js code. Suppose this is our excel sheet: Here we are using an existing npm package known as xlsx. xlsx is a parser and writer for various spreadsheet formats. Installation: With npm: $ npm install xlsx Usage in node.js The above code … Continue reading JavaScript – Reading Excel file using node.js! Solved!

Official Node.js Certification: Price, Syllabus and popular online courses

Node.js foundation has now opened an access to official certification for developers all around the world. Node.js has been said as the future of web development due to its features like non-blocking I/O and asynchronous functionality. Price: $300 Location: Remote, Online Retake: Allowed once Preparation: Material is included in the price. Average salary: $115K According to … Continue reading Official Node.js Certification: Price, Syllabus and popular online courses

How to use Timers in Node.js?

If you want to execute after set period of time, timers are used for that. Timers are globally available in node.js. Check official documentation here. Three types of timers are: setTimeout() setImmediate() setInterval(); setTimeout() - "When I say so!" used for scheduling execution of code after set of milliseconds. accepts set of arguments - first arg. … Continue reading How to use Timers in Node.js?

Asynchronous call to a REST API using Node.js and using the Promises.

There is nothing new about sending a request to a REST API and fetching a response. In this blog we will show how can we make an asynchronous call to a API, which means your node.js code will be able to perform other operations while it requests sent to an API fetched the response. What … Continue reading Asynchronous call to a REST API using Node.js and using the Promises.

Java-Spring or JavaScript-Node.js?

Spring Framework for Java has been around past 15 years since its initial release.  Most of the web developers prefer spring to build enterprise level web apps. But since last 3-4 years the Javascript has become more popular not only in the client-side development(Angular and React) but also towards the server-side development, thanks to nodejs.  … Continue reading Java-Spring or JavaScript-Node.js?