Skip to content

KrishnaTanay0607/Mini-Project-I

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š StudyHub

Run normally (if MongoDB connects fine)

Terminal 1: cd studyhub-backend β†’ npm install β†’ npm run dev Terminal 2: cd studyhub-frontend β†’ npm install β†’ npm start

Credentials already set in .env β€” no editing needed.


❌ If you see "querySrv ECONNREFUSED" on your laptop

Step 1 β€” Test the connection

cd studyhub-backend node test-connection.js (It will tell you exactly what's wrong)

Step 2 β€” Fix DNS (PowerShell as Administrator)

Right-click PowerShell β†’ "Run as Administrator" cd into studyhub-backend .\FIX-DNS.ps1

OR run manually: Set-DnsClientServerAddress -InterfaceAlias Wi-Fi -ServerAddresses 8.8.8.8,8.8.4.4 ipconfig /flushdns

Step 3 β€” Restart

npm run dev

Why it works on PC but not laptop

Your laptop's DNS server (from your ISP) can't look up MongoDB's SRV record. Google DNS (8.8.8.8) always works. server.js already tries Google DNS automatically, but if it still fails the system DNS is overriding it β€” that's what FIX-DNS.ps1 fixes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors