haydanu / user-profile

CRUD User Profile using MongoDB Express.js Node.js express-validator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User Profile REST-API

How To

Run Your Teminal

  • Clone this repository
git clone https://github.com/herdanuyp/user-profile.git
npm install
  • Run Your Server
nodemon server.js
  • Open/Test this API using POSTMAN
http://localhost:3000/user

to get all user profile
http://localhost:3000/user/signup

to create new user

{
 "name": "your name",
 "phoneNumber": "your phone number",
 "email": "your email",
 "password": "your password"
}
http://localhost:3000/user/:userId/change

change your password

{
 "password": "your new password"
}
http://localhost:3000/user/:userId

to delete user
http://localhost:3000/user/:userId

to update user profile

{
 "name": "your name"
 "phoneNumber": "your phone number"
}
http://localhost:3000/user/login

to login

{
 "email": "your email"
 "password": "your new password"
}

API Endpoints

HTTP Routes Description
GET / ...
GET /user get all user profile .
POST /user/signup to sign up as a new user
POST /user/login to login .
DELETE /user/:userId . delete user
POST /user/:userId/change to change password
PUT /user/:userId . to update user profile

About

CRUD User Profile using MongoDB Express.js Node.js express-validator


Languages

Language:JavaScript 91.7%Language:HTML 8.3%