Bhavi Digital

Bhavi Digital 🚀 BhaviDigital is where I share whatever I’m learning in coding—no fake hype, no heavy theory. Learn → Build → Share → Grow together

I’m learning myself, and I share the same things to help learners like me build job-ready projects and grow step by step.

When You Live 1 Hour Away From Your Office 😂
20/08/2026

When You Live 1 Hour Away From Your Office 😂

POV: Your workday starts 1 hour before you even reach the office 😂🚗...

Trying to study ❌ Singing “Oye hoye kya scene h” in my head for the 100th time ✅ 😂 This Song is Living Rent Free in My H...
23/06/2026

Trying to study ❌ Singing “Oye hoye kya scene h” in my head for the 100th time ✅ 😂 This Song is Living Rent Free in My Head 🤣
Can anyone relate? 🤣
🌐 Watch now :

Me: Let’s study seriously today 📚💻My brain after hearing “Oye Hoye...

🚀 ES6 Modules vs CommonJS Modules in JavaScriptIf you're learning backend or modern JavaScript, you've probably seen the...
28/05/2026

🚀 ES6 Modules vs CommonJS Modules in JavaScript

If you're learning backend or modern JavaScript, you've probably seen these two ways of importing files 👇

📌 CommonJS Module
(Used mostly in older Node.js projects)

Export:

```js id="r3k7n1"
module.exports = add
```

Import:

```js id="v6m2x8"
const add = require("./math")
```

📌 ES6 Module (ESM)
(Modern JavaScript standard)

Export:

```js id="b9q4p5"
export default add
```

Import:

```js id="c2z8w6"
import add from "./math.js"
```

⚡ Main Difference

✅ CommonJS uses:
`require()` & `module.exports`

✅ ES6 Modules use:
`import` & `export`

📌 Why ES6 Modules are becoming popular?

✔ Cleaner syntax
✔ Better readability
✔ Supported in modern browsers
✔ Official JavaScript standard
✔ Better for modern frameworks

📌 Enable ES6 Modules in Node.js

Add this in `package.json`

```json id="y7f1k3"
{
"type": "module"
}
```

💡 CommonJS is still widely used in older Node.js applications, but ES6 Modules are the future of JavaScript development.

If you’re starting today, learn both — but focus more on ES6 Modules 🚀

POV: girl coders know the struggle 😂💻💅Code perfect ho na ho… nails perfect hone chahiye ✨Balancing coding, aesthetics & ...
27/05/2026

POV: girl coders know the struggle 😂💻💅
Code perfect ho na ho… nails perfect hone chahiye ✨
Balancing coding, aesthetics & main character energy 😌👩‍💻


LINK:

POV: girl coders know the struggle 😂💻💅Code perfect ho na ho… nails...

🚀 What is CORS in Backend Development?If you are working with frontend + backend projects, you’ve probably seen this err...
19/05/2026

🚀 What is CORS in Backend Development?
If you are working with frontend + backend projects, you’ve probably seen this error 👇

❌ “Blocked by CORS Policy”
But what actually is CORS? 🤔

📌 CORS stands for:
Cross-Origin Resource Sharing
It is a security feature used by browsers to control requests between different domains.

Example 👇
Frontend:
http://localhost:3000
Backend API:
http://localhost:5000

Since both URLs have different ports, the browser treats them as different origins.
So when frontend tries to fetch data from backend, the browser blocks the request unless CORS is enabled.

✅ Solution in Express.js
Install CORS package:
npm install cors

Use it in your server:
const express = require("express")
const cors = require("cors")
const app = express()
app.use(cors())

🎉 Now your frontend can communicate with your backend successfully.

💡 Why CORS is Important?
✅ Protects APIs from unauthorized access
✅ Adds browser-level security
✅ Allows controlled data sharing between applications

Understanding CORS is one of the most important concepts for full-stack developers. 🚀

🚀 Basic MongoDB Commands Every Beginner Should Know !If you’re starting your backend journey, learning MongoDB basics is...
18/05/2026

🚀 Basic MongoDB Commands Every Beginner Should Know !
If you’re starting your backend journey, learning MongoDB basics is a must. 💻

Here are some MongoDB commands every developer should practice 👇

📌 Show all databases
show dbs

📌 Create / Switch Database
use schoolDB

📌 Show current database
db

📌 Create Collection
db.createCollection("students")

📌 Insert One Document
db.students.insertOne({
name: "Rahul",
age: 21
})

📌 Insert Multiple Documents
db.students.insertMany([
{ name: "Aman", age: 20 },
{ name: "Priya", age: 22 }
])

📌 Find All Data
db.students.find()

📌 Find Specific Data
db.students.find({ age: 21 })

📌 Update Data
db.students.updateOne(
{ name: "Rahul" },
{ $set: { age: 23 } }
)

📌 Delete Data
db.students.deleteOne({ name: "Rahul" })

📌 Delete Collection
db.students.drop()

💡 MongoDB stores data in flexible JSON-like documents, making it beginner-friendly and powerful for modern web applications.

Start practicing these commands daily and your database skills will improve fast 🚀

🚀 Understanding Path Params in Backend Development (Node.js + Express)If you are learning backend development, then you’...
17/05/2026

🚀 Understanding Path Params in Backend Development (Node.js + Express)

If you are learning backend development, then you’ll often hear about Path Params (also called Route Params).

But what exactly are they? 🤔
👉 Path Params are dynamic values passed directly inside the URL path.

Example:
/users/101
Here, 101 is the path parameter.

In Express.js, we define it like this:
app.get('/users/:id', (req, res) => {
console.log(req.params.id)
res.send(`User ID is ${req.params.id}`)
})

📌 Output:
If user visits /users/101
→ Response: User ID is 101

💡 Why Path Params are useful?
✅ Fetch specific user data
✅ Get product details
✅ Dynamic routing
✅ Build REST APIs efficiently

Examples from real-world apps:
🔹 /products/55
🔹 /students/12
🔹 /blogs/javascript-basics

⚡ Difference Between Path Params & Query Params
Path Params:
/users/101
Query Params:
/users?id=101

👉 Path Params are mostly used when identifying a specific resource.
If you're learning backend development, mastering routing concepts like this is super important. 🚀

🔥 What Are Query Parameters in Backend ?If you’re learning backend development, understanding Query Params is super impo...
16/05/2026

🔥 What Are Query Parameters in Backend ?
If you’re learning backend development, understanding Query Params is super important because they are used in almost every real-world application.

━━━━━━━━━━━━━━━
📌 What are Query Parameters?
━━━━━━━━━━━━━━━

Query Parameters are values passed inside the URL to send extra information to the server.
They start after the ? symbol in a URL.

Example 👇
http://localhost:3000/products?category=mobile&brand=apple

Here:
category=mobile
brand=apple
These are Query Parameters.

━━━━━━━━━━━━━━━
📌 Why Do We Use Query Params?
━━━━━━━━━━━━━━━

They help us:
✅ Filter Data
✅ Search Data
✅ Sort Results
✅ Handle Pagination
✅ Send Small Optional Information

Real examples 👇
/products?category=laptop
/products?page=2
/search?keyword=iphone
/users?sort=age

━━━━━━━━━━━━━━━
📌 How To Access Query Params in Express.js?
━━━━━━━━━━━━━━━
Express.js gives us a built-in object called:
req.query

Example 👇
const express = require("express");
const app = express();
app.get("/products", (req, res) => {
console.log(req.query);
res.send(req.query);
});
app.listen(3000);

💡 Important:
Query params always come after ?
Multiple params are separated using &
Data received from query params is always in string format

Master Query Params and your backend skills will instantly improve 🚀

Most beginners learn HTML + CSS + JavaScript…But when they start building real backend projects with Node.js, they get s...
14/05/2026

Most beginners learn HTML + CSS + JavaScript…
But when they start building real backend projects with Node.js, they get stuck on one thing:
👉 “How do I show dynamic data inside HTML?”

That’s where **EJS (Embedded JavaScript)** becomes powerful.
EJS allows you to create dynamic web pages using plain HTML + JavaScript.

Instead of writing static HTML files, you can directly send data from your backend to your frontend.

Example 👇
Welcome
If `userName = "Bhavi"`
Output becomes:
Welcome Bhavi

Why developers love EJS:
✅ Easy to learn for beginners
✅ Works perfectly with Node.js + Express
✅ Reuse components using partials
✅ Dynamic rendering becomes simple
✅ Great for dashboards, admin panels, blogs, portals, etc.

One underrated feature in EJS 👇
🔥 Partials

Instead of repeating navbar/footer on every page:

Write once → use everywhere.

That’s how real-world projects stay clean and maintainable.
If you're learning backend development,
don’t just build APIs.

Learn how data connects with UI using templating engines like EJS.
Small skill.
Huge upgrade in real project development. 🚀

🚀 Understanding the Path Module in Node.jsWhile working on backend projects, one module that makes file and folder handl...
13/05/2026

🚀 Understanding the Path Module in Node.js

While working on backend projects, one module that makes file and folder handling much easier is the Path Module in Node.js. 📁

Instead of manually writing file paths, the Path module helps create clean, reliable, and cross-platform paths.

✨ Common Uses:
✔️ Joining file paths
✔️ Getting file extensions
✔️ Finding directory names
✔️ Creating absolute paths
✔️ Working with uploads & static files

Example:
const path = require("path");
const filePath = path.join(__dirname, "public", "images", "photo.png");
console.log(filePath);

🔥 Why use it?
Because different operating systems use different path separators:

* Windows → `\`
* Linux/Mac → `/`

The Path module handles everything automatically, making your backend code more professional and error-free.

📌 Useful Methods:

* `path.join()`
* `path.basename()`
* `path.dirname()`
* `path.extname()`
* `path.resolve()`

Small modules like this make a huge difference in real-world backend applications. 💡

Address

Tank Road
Delhi
110005

Website

Alerts

Be the first to know and let us send you an email when Bhavi Digital posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Shortcuts

Share

Category