Skip to content

edilsobai/auth_users-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auth Users API

This project is a RESTful API for user authentication and management. It provides endpoints for user registration, login, and profile management. The API uses various technologies such as JWT, bcrypt, Express, and Mongoose.

Technologies Used

The following technologies are used in this project:

  • JWT (JSON Web Tokens): Used for authentication and generating secure tokens for user sessions.
  • bcrypt: Used for hashing and salting user passwords for secure storage.
  • Express: A fast and minimalist web framework for Node.js used for building the API endpoints.
  • Mongoose: An object modeling library for MongoDB used for database interactions and data validation.

Getting Started

To get started with the project, follow these instructions:

Prerequisites

You need to have the following software installed on your system:

Installation

  1. Clone the repository:

    git clone https://github.com/edilsobai/auth_users-api.git
    
  2. Navigate to the project directory:

    cd auth-users-api
    
  3. Install the dependencies:

    npm install
    

Set up the environment variables:

  1. Create a .env file in the root directory of the project. Add the following environment variables:

    PORT=3000
    JWT_SECRET=your_jwt_secret
    MONGODB_URI=your_mongodb_uri
    
  2. Start the server:

    npm start
    
  3. The API will now be running on:

    http://localhost:5000.
    

API Endpoints

The Auth Users API provides the following endpoints:

  • POST /api/register: Register a new user.
  • POST /api/login: User login.
  • GET /api/profile: Get user profile (requires authentication).

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published