Express क्या है
Express Node के http module के ऊपर एक छोटा framework है जो routing और middleware आसान बनाता है।
In this page:
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
$ 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. #}
आम गलतियां
- यह सोचना कि Express Node replace करता है
- बहुत ज़्यादा middleware add करना
- 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: