But when are things that simple?Īccording to the Express website itself, Express is a "Fast, unopinionated, minimalist web framework for Node.js". This code creates a basic HTTP server that listens to requests on port 8000 and returns "Hello World".įor something that simple, you don't need Express. ![]() You can do that using the built in http module: const http = require("http") Ĭonst server = http.createServer((req, res) => ) Ĭonsole.log(`Server listening on port 8000`) Express can be used to create JSON APIs, Server-side rendered web applications, or Microservices.īut why? You don't need Express to create a basic HTTP server with Node.js. The most common use for Node.js is writing Web applications, and a large percentage of these web applications today are using Express.js as their server framework. Watch: What Is the Express Node.js Framework? Express.js overview ![]() Understand core concepts of the Express server Node.js framework, including how it helps create web applications.
0 Comments
Leave a Reply. |