I have a Nodejs app (with hapi.js) accessing data from mongo altas currently which is working fine, I am accessing the data in mongoatlas with such URL: mongodb+srv://user:[email protected], recently I would like to try mongo in digital ocean (it's a bit cheaper if data size is bigger), so I setup the mongodb there and transferred all data, then I change the url to mongodb+srv://username:[email protected], it shows 500 internal error..
$ node main.js digital
Starting server in DIGITAL mode...
Established MongoDB connection at mongodb srv://[email protected]
Server running at http://localhost:3001
230410/033627.252, (1681097787252:local:43559:lgaa7rua:10000) [response,api] http://localhost:3001: get /hg19/genes/refGene/queryRegion {"chr":"chr7","start":26720381,"end":27681488} 500 (48ms)
230410/033628.358, (1681097788358:local:43559:lgaa7rua:10001) [response,api] http://localhost:3001: get /hg19/genes/refGene/queryRegion {"chr":"chr7","start":26720381,"end":27681488} 500 (32ms)
$ node main.js atlas
Starting server in ATLAS mode...
Established MongoDB connection at mongodb srv://[email protected]
Server running at http://localhost:3001
230410/033705.233, (1681097825233:local:43619:lgaa8ijn:10000) [response,api] http://localhost:3001: get /hg19/genes/refGene/queryRegion {"chr":"chr7","start":26720381,"end":27681488} 200 (43ms)
So exactly one nodejs app, only change is I changed the database URL in MongoClient.connect function..
both databases can be accessed with mongo cli or mongo compass without any error...
any hit to resolve this? Thank you!