← Back to Node.js Course | Chapter 7: Express.js Basics | Lesson 1 of 7

Express क्या है

Express Node के http module के ऊपर एक छोटा framework है जो routing और middleware आसान बनाता है।

Express क्या है

Express Node के HTTP server को routes, middleware, और templating के लिए एक friendly API से wrap करता है। यह unopinionated है और कई दूसरे frameworks का base है। एक Express app एक function है जिसे आप http.createServer को pass करते हैं या app.listen से चलाते हैं।

Note: Express खुद tiny है; इसकी power middleware से आती है।

उदाहरण: What is Express

bash
$ node -e "console.log(typeof require('express'))"
function
$ # A minimal Express app
const express = require("express");
const app = express();
app.get("/", (req, res) => res.send("Hello Express"));
app.listen(3000);

⚠️ Run this in your own terminal or Node.js environment.

Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. यह सोचना कि Express Node replace करता है
  2. बहुत ज़्यादा middleware add करना
  3. error handling ignore करना
चैप्टर सारांश
  • Express Node के लिए एक web framework है
  • यह routing simplify करता है
  • Middleware features add करता है
  • http पर built है
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.