Node-API-Backend
Using Express, Mongoose, Bcrypt, and Node.js,
I'm currently working on a backend for an authentication system that features hashed passwords, JWT and numerous checks.
This is still a project is not yet FULLY complete
Current JWT Protected Endpoints (requires a login to get a token)
ADMIN
FILES
SECRET
Configuration
PORT = 1337 VERSION = 1.3.3.7 TOKEN_SECRET = SALTYTOKENS CUSTOM_HEADER = PURE_SALT CUSTOM_HEADER_VALUE = SALTYVALUE DB_CON_STRING = MONGO-DB-CON-LINK-HERE
Getting Started
Install Node.js
Follow these instructions in a terminal environment.
# Goto Dir $ cd Node-API-Backend # Install packages $ npm i # Boot it up (Will be changed to 'npm start') $ node app.js
API End Points
Note: Simply create a json body request for posts using the same values as the GET requests.
Most endpoints may require the auth-token header to be set which you get after you login
API
Register
http://SERVER:1337/api/user/register (POST)
http://SERVER:1337/a...edwip/:referral (GET)
Login
http://SERVER:1337/api/user/login (POST)
http://SERVER:1337/a...email/:password (GET)
Upload
http://SERVER:1337/api/files/upload (POST)
Note: Check the response
http://SERVER:1337/api/files/upload_db (POST) Uploads to mongo db
Note: Check the response
Upload List
http://SERVER:1337/api/files/list (GET)
Note: Returns json array list
ADMIN API
Remove User
http://SERVER:1337/a...min/remove_user (POST)
Note: Making a post request with the query {email: "[email protected]"} will delete the associated account.
Make sure to include your CUSTOM_HEADER and CUSTOM_HEADER_VALUE in the header of the request
Remove File
http://SERVER:1337/a...min/remove_file (POST)
Note: Making a post request with the query {name: "test.txt"} will delete the associated file.
Make sure to include your CUSTOM_HEADER and CUSTOM_HEADER_VALUE in the header of the request
SECRET API
Get Download
http://SERVER:1337/a...ret/getDownload (GET)
Dev Notes
http://SERVER:1337/a...ecret/dev_notes (GET)
http://SERVER:1337/a...submit_dev_note (POST)
SOURCE DOWNLOAD
Edited by 0xWarning, 02 June 2023 - 02:28 AM.