-
Create a new env file as shown in the .env.example file.
-
Fill in all the required credentials:
- PORT = 4000 // depends on existing port on your machine
- DB_HOST = localhost
- DB_NAME = db_login_practice
- DB_USER = root
- DB_PASSWORD = ""
- JWT_SECRET = logipractice778989 // better make it long and just a random string
-
Optional, better to use a longer and more complex random string as JWT_SECRET value
-
Install dependencies:
npm i
-
Run Apache and MySql, then import the db_login_practice.sql file
- Existing user username = krisna, password = muehehe
-
Start the API:
npm run dev
-
Notifications
You must be signed in to change notification settings - Fork 0
aryaulyakrisna/login-practice
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Simple Rest API for login & register with JSON Web Token
Topics
Resources
Stars
Watchers
Forks
Packages 0
No packages published