Skip to content

HideakiAtsuyo/Little-NodeJS-Login_Register-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Little-NodeJS-Login_Register-API

Open an Issue if you:

  • Have a problem
  • Have some suggestions
  • Have some IDEAS
  • Anything other who care lol

Configuration

  1. Setup the database

Create a database with then name in the config.json file.

Then:
1.1) https://i.imgur.com/i35JiyN.png
1.2) https://i.imgur.com/zfLFGR9.png

  1. Edit the config.json
{
	"Port": 3000,
	"getAnswer_deadmode": true,
	"apikeys": ["adminlmao", "omgananotherkey"],
	"database":{
		"host": "x.x.x.x or localhost",
		"username": "username",
		"password": "password",
		"name": "loginregisterapi"
	}
}

Content-Type: application/json :)

Endpoints list | METHOD | example body(x = no body):

/auth/login | POST | {"username": "theUsername", "password": "thePassword"}
/auth/register | POST | {"username": "theUsername", "email": "theEmail", "password": "thePassword"}
/auth/updatepassword | POST | {"username": "theUsername", "password": "thePassword", "newpassword": "theNewPassword"}
/auth/delete | POST | {"username": "theUsername", "password": "thePassword"}
====================
/admin/keys | GET | x
/admin/delete | POST | {"username": "theUsername", "key": "theKey"}
/admin/updateban | POST | {"username": "theUsername", "key": "theKey", "banned": "0/1"}
/admin/updatepassword | POST | {"username": "theUsername", "key": "theKey", "newpassword": "theNewPassword"}

I think i will update it because i need to make a better code :(

About

Made quickly a shitty api that just need a server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published