Skip to content

RubenD96/maple-register-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maple-register-api

Installation

  1. download nodejs https://nodejs.org/en

  2. After installing nodejs, run these on the root folder of the project:

npm i
  1. edit the database settings in config/config.json

  2. Set your reCAPTCHA token in config/config.json (or disable it entirely by removing it from controllers/authController.js)

Starting

npm run start

The api server should now run on port 3000

Testing

Testing without a site can be difficult with the reCAPTCHA validation present.

A curl request without token (Edit controllers/authController.js to disable the token):

curl -X POST http://localhost:3000/api/auth/register -H "Content-Type: application/json" -d '{"name":"admin", "password":"password"}'

Additional notes

this form of bcrypt generates a $2b$ encryption, which is is compatible with the $2y$ encryption maplestory bcrypt uses by default. https://www.npmjs.com/package/bcrypt#compatibility-note

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published