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.

Online CSS Prettify

Online CSS Prettify

CSS Prettify CSS Input Formatted Output Prettify CSS Clear All Control What it does Prettify CSS Places transformed text in Formatted Output. Clear All Empties both text areas. A compact CSS rule can be hard to scan when its selector…

Regular Expressions in JavaScript

Regular Expressions in JavaScript

To check whether a string follows a format, such as a code made of two letters, a hyphen and four digits, JavaScript gives you regular expressions. A regular expression, or regex, is a pattern that searches text for a particular…

NodeJS MySQL Create Database

NodeJS MySQL Create Database

Create a MySQL database from Node.js with one query. The trick is connecting without naming a database first, running CREATE DATABASE IF NOT EXISTS, then verifying the schema exists. Here is how to do it with mysql2 and handle the…

NodeJS MySQL Select Unique

NodeJS MySQL Select Unique

I ran SELECT UNIQUE age FROM users on a table with a duplicated age. It returned 22, 17 and 15, the same rows SELECT DISTINCT returns. On MySQL 8 that statement stops before the table is read, because UNIQUE never…

Node.js MySQL Insert Record

Node.js MySQL Insert Record

I pointed a Node script at a MySQL table and the connection succeeded. The INSERT failed on a name containing an apostrophe. Pasting values into the SQL string holds until real data arrives, then a name like O’Brien ends the…