This repository contains a basic user system for a web application.
-
Create a new gmail for yourself (it works with any provider but some authorizations may vay)
-
Set up 2FA for your new google account
-
Create a new app password with "email" as the app name
-
Fill in your own .env with your Gmail email and it's specific app password:
EMAIL = "[email protected]"
EMAIL_PASSWORD = **** **** **** ****
-
Install the dependencies:
npm install
-
In your .env file will also need:
JWT_SECRET = A random alphanumeric code SITE_HOST = Localhost or your own provider PORT = The port you are hosting on SALT_ROUNDS = Any number, usually greater than 10
For example
JWT_SECRET = 37yhefb2dfiusd79hdjqkw SITE_HOST = localhost PORT = 8080 SALT_ROUNDS = 10
- note that the DB (state.json) is going to be generated automatically after the first run and every time it's deleted
-
Run the server:
npm run dev
-
Open your browser and search for
http://localhost:8080
. -
Make sure to be connected to the network to be able to send emails