UI / UX
January 15, 2019
Running Cron Jobs in Node.js
Cron jobs are important when some script is required to be executed at a fixed time over and over again. In Node.js cron jobs can be setup using an external module known as node-cron.
January 9, 2019
Using the Reviver Function in JSON.parse
JSON.parse accepts an optional second parameter - the reviver function. The purpose of this function is to modify the result before returning, and can be thought of as filter function.
January 3, 2019
Reading JSON in Node.js
December 27, 2018
Reading XML in Node.js
The "xml2js" module can be used to read XML files in Node. In case if the file is huge, the "node-xml-stream" module can be used to read XML as a stream.
December 21, 2018
How to Crop Images in Node.js
The Sharp module can be used to crop an image in Node.
December 4, 2018
Resizing Images in Node.js
The Sharp Node.js module can be used to resize large images of any common file-type to web-friendly images of any dimension. It claims to be multiple times faster than ImageMagick and GraphicsMagick.
November 21, 2018
Node.js - Reading a File Line by Line
In some cases you may need to read a file, line by line, asynchronously. This can be done by the Readline module that reads data from a readable stream and emits an event after reading each line.
October 18, 2018
Getting POST Parameters in Node.js
POST parameters can be read with the querystring module. In case of a multipart/form-data POST request, external modules are required.
October 15, 2018
Getting URL Parameters in Node.js
You can get url parameters in Node by importing the built-in "url" module. This module gives access to the URL and URLSearchParams objects.
October 10, 2018
Routing in Node.js (without framework)
Frameworks such as ExpressJS makes routing quite easy. But initially it is important to understand how routing works in Node.js, and not to jump to ExpressJS straightaway.
June 9, 2018
How to Write a REST API Class for Node.js
While implementing an API with Node.js, it is better to write it as a class, create a module, and import the module in the main Node.js script. This tutorial describes general coding guidelines how you can create such a class.
June 7, 2018
© UsefulAngle.com 2016 - 2019. All code MIT license.