Aditya Gupta

Aditya Gupta

Aditya Gupta is a founding member and editor at CodeForGeek. He first found his way into tech by reading articles, and now writes approachable guides to Node.js security, authentication, AI tools, coding agents, and web scraping.

Controllers in NodeJS

Controllers in NodeJS

A controller is a function that defines the response sent to a client when making a request to the server.  This tutorial teaches you the concept of controllers in NodeJS. We highly recommend you read the previous tutorial Separating Routers…

Separating Routers in NodeJS

Separating Routers in NodeJS

A website has multiple pages which can be accessed using endpoints, a endpoint has two parts the URI and the HTTP request method such as get, post, etc. For example, for opening a website home page clients have to make…

Run a batch file in NodeJS

Run a batch file in NodeJS

NodeJS is an open-source, cross-platform runtime environment used for multiple tasks, it can interact with files, implement all types of databases, perform various operations, etc. NodeJS can also run the bash files asynchronously without blocking the other block of code.…

NodeJS MongoDB Remove

NodeJS MongoDB Remove

MongoDB database is used to store a large number of records, these records are called documents. These documents take some space in the memory, and to free up the space occupied by irrelevant documents they can be directly removed. Document…

NodeJS MongoDB Sorting

NodeJS MongoDB Sorting

MongoDB database has one or many collections in which records are present. These records are called documents in MongoDB. Overview of MongoDB Sorting Sorting is a technique to rearrange documents. This rearrangement can be ascending or descending according to the…

NodeJS MongoDB Insert

NodeJS MongoDB Insert

MongoDB is a NoSQL database that can store a large amount of unstructured data. Data stored in MongoDB are easy to retrieve as it can hold them in flexible formats depending upon the need such as graphs, key values, documents,…

NodeJS MongoDB Create Database

NodeJS MongoDB Create Database

MongoDB is a NoSQL database that can store a large amount of unstructured data. Data stored in MongoDB are easy to retrieve as it can hold them in flexible formats depending upon the need such as graphs, key values, documents,…

NodeJS MySQL Delete Record

NodeJS MySQL Delete Record

Deleting a MySQL row from Node.js looks simple until you concatenate an id from a request and nothing happens or worse everything disappears. I ran the current mysql2 driver against three small demos on this page and watched a single…