A simple Express.js backend project that returns a JSON response from the root route.
This project is the first step in learning Express.js backend development.
It focuses on:
- setting up an Express server
- creating a basic route
- returning a JSON response
- running the server locally
- Node.js
- Express.js
express-project-01-hello-world-api
│
├─ node_modules
├─ .gitignore
├─ index.js
├─ package.json
├─ package-lock.json
└─ README.md
Clone the repository
git clone https://github.com/a2rp/express-project-01-hello-world-api.git
cd express-project-01-hello-world-apiInstall dependencies
npm installnode index.jsServer will run at
http://localhost:1198
Returns a JSON response
{
"message": "Hello World from Express.js API"
}By building this project you learn how to
- initialize an Express application
- create a server
- define a route
- send JSON responses
Ashish Ranjan
Follow me
- GitHub: https://github.com/a2rp
- Portfolio: https://www.ashishranjan.net
- LinkedIn: https://www.linkedin.com/in/aashishranjan
- Facebook: https://www.facebook.com/theash.ashish/