Node.js BasicsCore· 30 min read

What is Node.js?

JavaScript escaped the browser. Node lets you run JS on a server to build back-ends, APIs and tools.

What you will learn

  • Explain what Node.js is
  • Understand front-end vs back-end
  • See why one language for the whole stack is powerful

JavaScript on the server

Node.js is a runtime that lets you run JavaScript outside the browser — on a server or your own computer. Before Node, JavaScript only ran in browsers. Now the same language runs everywhere.

Front-end vs back-end

Front-endBack-end
Runs onThe user’s browserA server (Node)
JobWhat the user sees and clicksData, logic, security, APIs
In MERNReactNode + Express + MongoDB
LanguageJavaScriptJavaScript (with Node!)

A typical app: your React front-end asks your Node/Express back-end for data; the back-end fetches it from the MongoDB database and sends it back as JSON. You already practised the front-end half with fetch — now you build the other half.

Note: Two acronyms you will see constantly: • MERN is just the four tools spelled out by their first letters — MongoDB (the database), Express (the back-end framework), React (the front-end), Node (the runtime that runs your JavaScript on the server). This course covers the E and N. • JSON (JavaScript Object Notation) is simply a plain-text way to write data that looks like a JavaScript object, for example {"name": "Asha", "age": 20}. It is the standard format that front-ends and back-ends use to send data to each other.

The other word you will meet everywhere is API (Application Programming Interface) — a fancy phrase for a way for two programs to talk to each other. When your React app asks your Express server for data, it is calling your API. You are about to build one.

Tip: The huge win of MERN: one language, JavaScript, for the entire stack — front-end, back-end and even the database queries. Learn JS deeply and you can build everything.

Note: Node is famous for being fast and non-blocking (asynchronous) — it handles many requests at once without waiting around. That is why the async/await you learned matters so much here.

Q. What does Node.js let you do?

Answer: Node.js is a runtime that executes JavaScript outside the browser, enabling back-end servers, APIs and command-line tools.

✍️ Practice

  1. Write down three things a back-end does that a front-end cannot.
  2. Draw the MERN request flow: React → Express → MongoDB → back.

🏠 Homework

  1. In two sentences, explain why using JavaScript on both front-end and back-end is convenient.
Want to learn this with a mentor?

CodingClave runs guided, project-based training (28-day, 45-day & 6-month batches).

Explore Training →