Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devadedeji/linkbum-backend
Backend part of linkbum
https://github.com/devadedeji/linkbum-backend
bcrypt epxressjs jsonwebtoken mongodb mongoose nodejs
Last synced: 18 days ago
JSON representation
Backend part of linkbum
- Host: GitHub
- URL: https://github.com/devadedeji/linkbum-backend
- Owner: DevAdedeji
- Created: 2022-12-21T22:42:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T13:33:42.000Z (12 months ago)
- Last Synced: 2024-10-17T18:22:24.559Z (28 days ago)
- Topics: bcrypt, epxressjs, jsonwebtoken, mongodb, mongoose, nodejs
- Language: JavaScript
- Homepage: https://linkbum.cyclic.app/
- Size: 299 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Linkbum
Linkbum is a platform where users can add all their links to one shareable link. Got the idea from linktr.ee
## FEATURES
- Authentication (Registration and Login)
- Add links, update a link, delete a link
- Update bio, account information, profile picture## Live link
- https://linkbum.cyclic.app
## Endpoints
- Register: Endpoint is /api/auth/register, Method is post and it's expecting the JSON data;
```
{"username":"devadedeji", "email":"[email protected]", "password":"myPassword", "gender":"male"}
```Note: All fields are required.
Gender can either be male, female or others, after regstering, users should be directed to te login page.- Login: Login endpoint is /api/auth/login, Method is post and its expecting the JSON data;
```
{"username":"devadedeji", "password":"myPassword"}
```Note: All fields are required.
The response includes a token which will be used for authentication and authorization- Get user details: Endpoint is /api/user/:username
* Get logged in user details: Endpoint is /api/user/me/details, send the token as authorization in the request header
* Update user details: Endpoint is /api/user/me, send JSON data;
```
{"username":"devadedeji", "email":"[email protected]", "gender":"male", "bio": "Hi, I'm a software engineer"}
```- Add a new link: Endpoint is /api/link/post, expecting the json data with token as authorization in the request header;
```
{"title":"My Link", "link":"https://mylink.com"}
```- Updating a link: Endpoint is /api/link/post/:id, Method is PUT, and id is the id of the link, expecting the json data with token as authorization in the request header;
```
{"title":"My Link", "link":"https://mylink.com"}
```- Updating a link: Endpoint is /api/link/post/:id, Method is DELETE, and id is the id of the link to be deleted