https://github.com/markkos89/nodejs-mysql-rest-api-boilerplate
nodejs-JWT-auth-mysql-REST-API-boilerplate
https://github.com/markkos89/nodejs-mysql-rest-api-boilerplate
Last synced: about 1 year ago
JSON representation
nodejs-JWT-auth-mysql-REST-API-boilerplate
- Host: GitHub
- URL: https://github.com/markkos89/nodejs-mysql-rest-api-boilerplate
- Owner: Markkos89
- Created: 2020-08-11T06:56:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-11T07:06:45.000Z (almost 6 years ago)
- Last Synced: 2025-02-13T07:33:03.655Z (over 1 year ago)
- Language: JavaScript
- Size: 335 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Nodejs RESTful API Boilerplate with JSONWebToken | Express Js
### How to use
- Clone the repository with __git clone__
- Run __npm install__
- Run __cp .env.example .env__ for create .env file
- Import __db.sql__ database
- Edit database credentials __.env__ file
- Run __npm run dev__ for start server
### Serve run http://localhost:8080
## API Endpoints
#### Welcome
- **GET api/welcome**
#### Authentication
- **POST api/login**
#### Registration
- **POST api/register**
- **POST api/account-verification**
- **POST api/account-verification-resend**
#### Password Reset
- **POST api/password/forgot**
- **POST api/password/forgot-code-match**
- **POST api/password/reset**
#### User
- **GET api/users**
- **PUT api/users/:id/toggle-status**
## API Status Code
Following status codes in its API:
| Status Code | Description |
| :--- | :--- |
| `2xx Success` |
| 200 | `Success` |
| 201 | `Created` |
| `4xx Client Error` |
| 400 | `Bad Request` |
| 401 | `Unauthorized` |
| 404 | `Not Found` |
| `5xx Server Error` |
| 500 | `Internal Server Error` |