Getting Started With Express.js

Full-stack software engineer with 2.5 years of experience building reliable, scalable web apps using JavaScript, TypeScript, React, Next.js, Node.js, and MongoDB. I enjoy creating clean, reusable UI components, integrating APIs, and improving performance through web vitals, code-splitting, and smart bundling. I regularly use Claude, GPT, Cursor AI, and custom automation workflows to speed up development and solve problems faster. I’ve also worked with AI agents, LLMs to simplify workflows and make features more intuitive for users. Above all, I care about writing maintainable code, collaborating well with teams, and designing systems that stay fast, stable, and easy to scale.
Express
Express.js is a popular Node.js web application framework that allows developers to easily create server-side web applications. In this blog post, we will go through the basics of getting started with Express.js by building a simple "Hello World" application.
Installing
First, we will need to install the Express.js package. This can be done by running the following command in your terminal:
npm install express
Once the package is installed, we can create a new JavaScript file for our application. In this example, we will call it "app.js".
Creating our first route
const express = require("express"); //ie export
const app = express();
//creating route
app.get("/", (req, res) => {
res.send("Hello World");
});
//listening
app.listen(3000, () => {
console.log("Server running on port 3000");
});
In the code above, we are requiring the Express.js module and creating a new Express application by calling the express() function. We then define a route for the root URL ("/") that will handle a GET request. When a user visits the root URL, our callback function will be executed, which sends a "Hello World" message back to the user.
Finally, we are telling the application to listen on port 3000 for incoming connections.
Running our Application
To run the application, we can simply execute the following command in the terminal:
node app.js
and then visit http://localhost:3000 in a web browser. It should show "Hello World"
This is just the beginning of what you can do with Express.js. You can also easily define other routes, use middleware, and handle different types of HTTP requests. Happy coding!




