Day 1 of Learning MERN Stack Backend

Priyanshu BhattPriyanshu Bhatt
2 min read

My Journey with npm, Node.js & Express.js πŸš€

Hello, fellow coders! πŸ‘‹

Today marks Day 1 of my MERN Stack backend learning journey and I want to share my progress, challenges, and some useful tips I picked up while diving into the world of Node.js and Express.js.


What I Learned Today

πŸ“¦ npm – The Package Manager You Must Know

npm (Node Package Manager) helps install, uninstall, and manage JavaScript packages effortlessly. It’s like your project’s accountant, keeping track of all your dependencies.

  • To initialize a project: npm init -y
  • To install a package: npm i <package-name>
  • To uninstall: npm uninstall <package-name>
  • You can also install specific versions!

Useful Link: npmjs.com


⚑ Node.js – The JavaScript Runtime Outside the Browser

Node.js lets us run JavaScript on the backend. It’s powered by Chrome’s V8 engine, which converts JS code into machine code for super fast execution. Today I practiced reading files and creating folders using Node’s fs module.


🌐 HTTP & HTTPS Protocols

These protocols set the rules for communication over the internet. Understanding these is crucial for backend development.


πŸ“ Understanding node_modules & Dependencies

  • Dependencies: Packages your app needs to run.
  • DevDependencies: Packages only needed during development (like testing tools or build scripts).

🚦 Express.js – The Web Framework

Express.js is the manager of requests and responses. It makes backend development easier and faster.

  • To install: npm i express
  • I set up nodemon globally (npm i -g nodemon) to auto-refresh my server on code changes.

Useful Link: Express.js Official Site


Debugging Experiences & Solutions

I initially struggled with remembering the exact commands to install/uninstall packages but realized npm’s official docs are a lifesaver! Also, setting up nodemon helped me avoid restarting the server manually β€” a huge productivity boost.


Questions for the Community πŸ€”

  • What are your favorite npm packages for MERN backend development?
  • How do you handle versioning and devDependencies in your projects?
  • Any tips on mastering Express.js quickly?

Final Thoughts

Starting the backend journey is both exciting and challenging. With tools like npm, Node.js, and Express, building scalable apps feels more achievable every day.

I’ll keep sharing daily updates, so stay tuned!


Hashtags

#MERNStack #NodeJS #ExpressJS #npm #BackendDevelopment #100DaysOfCode #JavaScript #WebDevelopment

0
Subscribe to my newsletter

Read articles from Priyanshu Bhatt directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Priyanshu Bhatt
Priyanshu Bhatt

πŸ‘‹ Hey there! I'm a final-year BCA student πŸ‘¨β€πŸ’» diving deep into MERN Stack πŸš€ | Python Django 🐍 | React βš›οΈ | Learning Java + DSA πŸ’‘ Passionate about building, breaking & learning every single day βš”οΈπŸ’» Sharing my dev journey as a #CodeNewbie πŸ’¬