RestAPI of user manipulation.
Before start, make sure you meet these requirements:
node
MySQL client
.To install UserAPI, follow these steps:
Clone the project and run the command in the root directory:
npm install
Change the file .envexample
with your environment variables:
## database config
DB_HOST=127.0.0.1
DB_USER=user
DB_PWD=password
DB_NAME=database
## E-mail trigger config
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=465
EMAIL_USER=youremail@gmail.com
EMAIL_PASSWORD=123456
## if your SMTP server didn't use SSL/TLS put false
EMAIL_SECURE=true
## JWT config
JWT_SECRET=f9f217a18745919771a7936b3a164121a
After that, rename the file to .env
Run the server with this line in the command line:
node index.js
(I recommend nodemon
to server auto-restart after changes)
Test and enjoy! 😅
To view the API documentation, check the file DOCUMENTATION.
To contribute, follow these steps:
git checkout -b mynewfeature
.git commit -m 'messagehere'
git push origin mynewfeature
Instead, you can check the GitHub documentation Creating a Pull Request.
This project is under license. Check the file LICENSE for more details.