Build a basic REST API to understand routing, HTTP methods, middleware, and error handling.
- GET / → Welcome message
- GET /users → Returns users list
- POST /users → Add new user
- Middleware for JSON parsing and logging
- 404 error handling
- Node.js
- Express.js
-
Install dependencies: npm install
-
Run server: node server.js
-
Open browser: http://localhost:3000