JavaScript

Mongo DB “update()” not working – Alternative Code

Update() in mongo db is deprecated and it was used for updating a record. Now this function can be done using replaceOne() . Here... Read more »

REST API PUT – Update Mongo DB Record

Update a record in Mongo DB database using express js code. PUT Request in REST API sample code example. app.route('/articles/:articleTitle').put(function(req, res){ Article.replaceOne( {title: req.params.articleTitle},... Read more »

REST API – GET Specific DB Record – Using Dynamic URL Value

Query and retrieve a specific Mongo DB record using Express JS REST API. Mongo DB findOne() method usage for retrieving single record from the... Read more »

Chained Route Handlers using Express JS

Optimizing the routes code by Chaining multiple routes together. GET, POST, DELETE request routes are chained together as an example in this article. Refactoring... Read more »

DELETE Request to Delete DATA – REST API – Express Mongo

Deleting Data from the MongoDB database using REST API - DELETE REQUST. Express JS code for the REST API - data deletion code. DELETE... Read more »

POST Request to Insert DATA – REST API – Express Mongo

Inserting Data to the MongoDB database using REST API - POST REQUST. Express JS code for the REST API - data insertion code. INSERT... Read more »

Get Request – REST API – Express JS Mongo DB APP Code

Retrieving Data from the MongoDB database using REST API - GET REQUST. Express JS code for the REST API - data retrieving code. GET... Read more »

lodash package in Node JS

Lodash is a wonderful javascript library that makes it easier to work with arrays, strings, objects numbers etc. Lodash’s modular methods are great for:... Read more »

Todo List Project Code – Node, Express, EJS

We are creating a sample to-do list app using Node and Express JS. The templating for the app is done using Embedded Javascript (EJS).... Read more »

module.exports Short usage in Javascript

module.exports is mainly used for exporting functions or data from a Module. It is basically done using module.exports keyword. This can be now shortened... Read more »