Description
📌 Overview
The DNS configuration is currently initialized directly in the application's server bootstrap file using dns.setServers(). While this works correctly, keeping infrastructure configuration inside the server entry point makes the file less organized and harder to maintain.
The DNS initialization should be extracted into a dedicated utility module responsible for configuring custom DNS servers.
This refactoring should preserve the existing behavior and should not introduce any functional changes.
✅ Tasks
- Create a dedicated DNS configuration utility (e.g.
utils/dnsConfig.js).
- Move the existing
dns.setServers() logic into the new utility.
- Export a function that initializes the DNS configuration.
- Import and invoke the function during application startup.
- Preserve the existing DNS server configuration.
- Ensure there are no behavioral changes after the refactor.
🎯 Expected Outcome
- Cleaner server bootstrap file.
- DNS configuration is centralized in a dedicated utility.
- Infrastructure-related configuration is separated from application startup logic.
- Easier to modify or extend DNS settings in the future.
📂 Suggested Project Structure
src/
├── utils/
│ └── dnsConfig.js
├── app.js
└── server.js
✅ Acceptance Criteria
📝 Notes
This is a refactoring task intended to improve project organization and maintainability. The DNS configuration should behave exactly as before.
Description
📌 Overview
The DNS configuration is currently initialized directly in the application's server bootstrap file using
dns.setServers(). While this works correctly, keeping infrastructure configuration inside the server entry point makes the file less organized and harder to maintain.The DNS initialization should be extracted into a dedicated utility module responsible for configuring custom DNS servers.
This refactoring should preserve the existing behavior and should not introduce any functional changes.
✅ Tasks
utils/dnsConfig.js).dns.setServers()logic into the new utility.🎯 Expected Outcome
📂 Suggested Project Structure
✅ Acceptance Criteria
📝 Notes
This is a refactoring task intended to improve project organization and maintainability. The DNS configuration should behave exactly as before.