This is about the SignUp and SignIn API endpoint where made using NodeJS with Express and MongoDB. This API provides endpoints for user sign-up and sign-in. It uses Express.js for the server, Mongoose for database interactions, and bcrypt for password hashing.
Before you begin, ensure you have met the following requirements:
To get a local copy up and running, follow these simple steps:
You can test the API using tools like Insomnia or Postman. Here are the available endpoints:
POST /api/auth/signup: Create a new user.
Example Request Body:
{
"name": "John Doe",
"email": "johndoe@example.com",
"password": "secretpassword"
}
POST /api/auth/signin: Sign in with an existing user.
Example Request Body:
{
"email": "johndoe@example.com",
"password": "secretpassword"
}
Note - Make sure to replace example data with your actual data.