Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 638 Bytes

README.md

File metadata and controls

25 lines (21 loc) · 638 Bytes

riddles_api

Riddles API for Whelp Backend Test by Sushil Ghambir

To run the API :

  • Create a db in postgres called whelp_test
  • Execute the script init.sql on the db.
  • Change the db connection settings in the apiController.js file
    • Add your username
    • Add your password
  • Build the projet with : 'npm run build'
  • Run the API with : 'npm run start'

Routes :

  • Register :
    • POST : /users/register
  • Login :
    • POST : /users/login
  • Retrieve all riddles :
    • GET : /riddles
  • Retrieve one specific user's riddles :
    • GET : /riddles/:userId
  • Create a riddle :
    • POST /riddles