Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gobinath-b/voosh-assesment
https://github.com/gobinath-b/voosh-assesment
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gobinath-b/voosh-assesment
- Owner: Gobinath-B
- Created: 2024-04-05T20:41:19.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-06T09:24:15.000Z (9 months ago)
- Last Synced: 2024-04-07T10:23:56.003Z (9 months ago)
- Language: JavaScript
- Size: 131 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Authentication API
This is a Node.js-based authentication API that allows users to register, log in, log out, view and edit their profiles, set profile privacy, and upload profile pictures.
## Getting Started
To get started with the project, follow these steps:
1. **Clone the repository:**
```bash
git clone https://github.com/Gobinath-B/voosh-Assesment.git `1. **Install dependencies:**
```bash
`npm install`3. **Set up environment variables:**
- Create a `.env` file in the root directory.
- Define environment variables like `PORT`, `DATABASE_URL`, etc. in the `.env` file.
4. **Start the server:**```bash
`npm start`
Usage
-----### Register User
- Endpoint: `POST /register`
- Description: Registers a new user with the provided username, email, and password.### Log In User
- Endpoint: `POST /login`
- Description: Logs in an existing user with the provided username and password.### Log Out User
- Endpoint: `POST /logout`
- Description: Logs out the currently authenticated user.### View User Profile
- Endpoint: `GET /profile`
- Description: Retrieves the profile details of the currently authenticated user.### Update User Profile
- Endpoint: `PUT /profile`
- Description: Updates the profile details of the currently authenticated user.### Set Profile Privacy
- Endpoint: `PUT /profile/privacy`
- Description: Sets the profile privacy setting (public or private) for the currently authenticated user.### Upload Profile Picture
- Endpoint: `POST /profile/upload`
- Description: Uploads a new profile picture for the currently authenticated user.