abhijeetnishal / URLShortener

URL Shortener Deployed Link 👇🏻
https://urlsrtner.vercel.app
MIT License
37 stars 59 forks source link

[Enhancement] Connect to Database only when required #18

Closed abhijeetnishal closed 3 months ago

abhijeetnishal commented 4 months ago

Description:

Currently, server establishes a connection to the MongoDB database as soon as the server starts. This means that the database connection is always active, even when no requests are being made to the server. This can lead to unnecessary resource usage and potential performance issues.

Requirements:

Technical Details:

Example Scenario:

Acceptance Criteria:

Estimated Time:

This issue is estimated to take around 1-2 days to complete, depending on the contributor's experience.

Sarthak027 commented 4 months ago

Hey I want to work on this!! Can U assign this to me ??

abhijeetnishal commented 4 months ago

Sure @Sarthak027, I am assigning this issue to you. Best of luck.

surendar-05 commented 4 months ago

Hey!! Assign this issue to me i want to work on this?

abhijeetnishal commented 4 months ago

Hey @surendar-05, This issue is already assigned to @Sarthak027. If the issue is not resolved then i will assign it to you.

Try to work on different issues, Good luck.

shubhammjha22 commented 3 months ago

Could you please assign this issue to me? I'd like to work on implementing the changes using middleware and updating the existing code to connect to the MongoDB database lazily.

abhijeetnishal commented 3 months ago

Could you please assign this issue to me? I'd like to work on implementing the changes using middleware and updating the existing code to connect to the MongoDB database lazily.

Hey @shubhammjha22, I already merged this issue. If you have any thoughts or idea to optimize this process let me know.