Skip to content

Simple Rest API for login & register with JSON Web Token

Notifications You must be signed in to change notification settings

aryaulyakrisna/login-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run the API

  • 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
    

About

Simple Rest API for login & register with JSON Web Token

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published