Skip to content

pawarvijay/faker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User Management CRUD API

A minimalist Express.js API for user management using @faker-js/faker to generate dummy data.

Setup

npm install
npm start

Server runs on http://localhost:3056

API Endpoints

Create User

  • POST /users
  • Generates a new user with fake data (id, name, email, description)

Read All Users

  • GET /users
  • Returns array of all users

Update User

  • PUT /users/:id
  • Body: JSON with fields to update (e.g., {"name": "New Name"})

Delete User

  • DELETE /users/:id
  • Removes user by ID

Example Usage

# 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}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors