After cloning the repository, run npm install
to install necessary dependencies.
Next, search for !CHANGE
in the server.js file and change these properties to your liking. Most of these have to be changed, as they are important credentials.
Finally, run the project using node server.js
.
This is the most simplistic form of a functional account backend with proper registration, logins, authentication ("bearer") tokens and password resets via email.
- POST /accounts/register - Used to register new accounts
- POST /accounts/login - Users can log in using this endpoint
- DELETE /accounts/delete - Users can delete their account using this
- POST /accounts/reset-password-request - Used to send out password reset emails
- POST /accounts/reset-password - Users can reset their password using an access token from the reset email
This boilerplate expects a basic MySQL database setup with:
- A table named "accounts"
- The follwing columns in said table:
- id (bigint)
- created_at (datetime)
- email (varchar(255))
- password (varchar(255))
- user_name (varchar(255)