Node and Express Notes
Node and Express Notes
js - Beginner Notes
1. What is Node.js?
Node.js is a runtime environment that allows you to run JavaScript code outside the browser. It
is built on the V8 JavaScript engine (the same engine that powers Google Chrome).
With Node.js, you can use JavaScript to build backend servers, APIs, work with files, connect to
databases, and more.
server.listen(3000, () => {
console.log('Server running on port 3000');
});
5. What is Express.js?
Express.js is a web application framework for Node.js. It simplifies the process of building web
servers and APIs.
It provides built-in functions for routing, middleware support, and handling HTTP requests and
responses.
app.use(express.json());
app.listen(3000, () => {
console.log('Server running on port 3000');
});