solve-ease / community-website

Built By community for the community
https://studentzynergy.netlify.app/
MIT License
5 stars 10 forks source link

Completed routes in frontend and server setup for login and register functionality #52

Closed AmanSingh494 closed 2 months ago

AmanSingh494 commented 2 months ago

Title:

Added routes in frontend and endpoints in backend

Description:

Configuration and setup of server and database. Created functions for sending request to server for login and signin

Related Issue:

Solves issue #36

Changes Made:

Backend - -Server.js is the main file in the server -server/db/index.js has db configurations for Postgre sql -server/routes/auth.js has api endpoints for register, login and token renewal -server/controllers/authControllers.js has logic for api endpoints Environment Variables - The server uses environment variables given below- -PSQL Setup variables PORT, PSQLPASSWORD, PSQLUSER, PSQLHOST, PSQLPORT, PSQLDATABASE CLIENT_URL (frontend url for cors) ACCESS_TOKEN_SECRET REFRESH_TOKEN_SECRET

Frontend - -config.js - contains backend url for requests -api.js - contains requests functions for login, register -login.js - function for sending user data to server on submit -register.js - function for sending user data to server on submit

Checklist:

Please contact me in case of any bug or issue.

netlify[bot] commented 2 months ago

Deploy Preview for studentzynergy failed.

Name Link
Latest commit 46e413c3f2042e747f77c0bee42a01edfbe7abb9
Latest deploy log https://app.netlify.com/sites/studentzynergy/deploys/66af17f3ef1c9300087951a4