Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor backend URL to use a centralized configuration #120

Closed
wants to merge 3 commits into from

Conversation

ygowthamr
Copy link
Contributor

Pull Request: Refactor backend URL to use a centralized configuration

Description

This pull request addresses the issue of hardcoded backend URLs in the application. The current implementation uses localhost:3000 in multiple places, making it cumbersome to update if the backend URL changes. This update introduces a centralized configuration file to store the backend URL, ensuring that changes can be made in one location and will reflect throughout the application.

Changes Made

  • Created a configuration file (config.js or .env) to store the backend URL.
  • Updated all instances of the hardcoded URL in the codebase to reference the new configuration file.

Updated Files and Line Numbers

  • Dashboard.html - line 137
  • fac_login.html - line 79
  • faculty.html - line 200
  • form_filling.html - line 158
  • login.html - line 80
  • signup.html - line 80
  • allotment.js - line 37
  • fac_signup.ejs - line 72
  • paper_allotment.js - line 112
  • stk_mainpage.js - line 113
  • approval.js - line 119
  • stk_signup.html - line 76
  • stk_login.html - line 89
  • stk_dashboard.html - line 255

Benefits

  • Improved Maintainability: Changes to the backend URL can be made in one place, reducing the risk of errors and ensuring consistency.
  • Flexibility: The application can be easily adapted to different environments (e.g., development, staging, production) without extensive code changes.

@Harshdev098
Pls add labels like hacktoberfest accepted , gssoc extd, level3 and other labels

@Harshdev098
Copy link
Member

Will review and merge the PRs till night

@ygowthamr
Copy link
Contributor Author

@Harshdev098
I have resolved the all the conflicts pls merge my pr.

Copy link
Member

@Harshdev098 Harshdev098 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make another PR with other branch its including the changes you have included in previous PR.
I am closing it for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants