Install mysql (see https://dev.mysql.com/downloads/installer/)
Change mysql user to root and password to password, or rewrite settings in UserService.js as wishes
mysql -p
to start mysql console
CREATE DATABASE user_server;
to create user server database
mysql -p user_server < ./db/DB.sql
to create schema and load default values for user table
npm install
to install node modules
npm start
to run server on localhost:8081
post token and username to know if the said token is valid (timeout = 7200s)
valid: 200
invalid: 400
{"username": "admin", "token": "U2FsdGVkX19dC/liDZG3E9oA8iDCW2YzEAjtLZ2EZaknkmmRIcezCfc0t8k6PwhNf48I89NY8je12MhDv/sAiDfE9nNEj+4n1Gh/V1MX4+k="}
this token is only for example, this will not work
post username and password to sign in (timeout = 7200s)
success: 200
unsuccess: 404
the body will contain token and expire time
{"username": "admin", "password": "password"}
this is the default login user
post username and password to sign up
success: 200
unsuccess: 400 (duplicate username)
{"username": "user", "password": "password"}