A minimalist Express.js API for user management using @faker-js/faker to generate dummy data.
npm install
npm startServer runs on http://localhost:3056
- POST
/users - Generates a new user with fake data (id, name, email, description)
- GET
/users - Returns array of all users
- PUT
/users/:id - Body: JSON with fields to update (e.g.,
{"name": "New Name"})
- DELETE
/users/:id - Removes user by ID
# Get all users
curl http://localhost:3056/users
# Create a user
curl -X POST http://localhost:3056/users
# Update a user
curl -X PUT -H "Content-Type: application/json" -d '{"name":"Updated Name"}' http://localhost:3056/users/{id}
# Delete a user
curl -X DELETE http://localhost:3056/users/{id}