MongoDB connection through proxy

I’m working behind a proxy, is there any way to establish a mongodb connection using a proxy? Otherwise I’ll use a local instance of mongoDB.

If it’s a plain HTTP/HTTPS proxy, then no. Mongo connections are not HTTP(S). If it’s a SOCKS proxy… maybe…

A quick bit of research suggest you’ll need an outgoing SSH tunnel, or a VPN connection. Sorry mate.

It is indeed an HTTP proxy, I’ve read the same as you when searching, the post was a long shot, hoping there may be some alternative.

I will use a local instance of MongoDB instead of Atlas in that case. Thank you for your response and confirming.

1 Like

@pawlowsg sorry there’s not better news, but you shouldn’t have any issues running locally. While building all of the M220 variants we tested against both local and Atlas deployments.

1 Like

That’s good to hear. I will do local and maybe try Atlas if I get to a connection without a proxy.

The jest test for “Client initialized with URI” when calling npm test -t mongoclient in Lecutre: MongoClient fails because the connection is local and not SSL. That’s not a big deal, I was still able to continue and get the validation code in the status page later on.

PS. I finished the prievious NodeJS course M101JS and this one i feel is already much better structured. I look forward to completing it. I also like the new message board.

1 Like

MongoU was my first encounter with Discourse. Ever since, I’m a huge fan :slight_smile: love the software!

1 Like

I agree with @pawlowsg; this course is much better structured and I really like the es6/7 and async/await functional structure.

1 Like