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:
[ ] My code follows the code style of this project
[ ] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
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.