Express JS - rohit120582sharma/Documentation GitHub Wiki

A framework is set of helper functions, tools, and rules that help you build your application.

Express JS is a Light-weight Web Framework to develop Web Applications very easily and quickly in Node JS Platform.

It makes it easier to organise your application’s functionality with middleware and routing; it adds helpful utilities to Node.js’s HTTP objects; it facilitates the rendering of dynamic HTML views.

HTTP Module is a basic module to develop HTTP based Networking applications. Node JS: Connect Module is developed on top of HTTP module to provide some extract features like Cookies, Middleware, CSRF etc. Node JS: Express module is developed on top of Connect module to provide some more additional features on top of HTTP and Connect Modules.


// Build a web server
const express = require(‘express’);
const app = express();

// Getting all the courses
app.get(/api/courses’, (req, res) => {
	// To read query string parameters (?sortBy=name)
	const sortBy = req.query.sortBy;
	// Return the courses
	res.send(courses);
});

// Listen on port 3000
app.listen(3000, () => console.log(‘Listening...));

References

⚠️ **GitHub.com Fallback** ⚠️