Database type - mongodb (mongodb Atlas).
DotEnv (.env
file) config:
- KEY - Public key for jwt signing;
- DB_URL - MongoDB cluster url.
- PORT - Custom port, default is 3000.
API (JSON):
- /signup [POST] - request for bearer token by id and password;
- /signup [POST] - creation of new user;
- Fields id and password. Id - phone number or email. After signup add field
id_type
- phone or email; - In case of successful signup - return token;
- Fields id and password. Id - phone number or email. After signup add field
- /info [GET] - returns user id and id type;
- /latency [GET] - returns service server latency for google.com;
- true - removes all users bearer tokens;
- false - removes only current token.