0

I'm developping a node app, where my data base is located at Compose.io (formerly MongoHQ)

The thing is that I can't work at school because the network is public and therefore some connexions are blocked. The tech guy working in the IT Departement told me to use an ssh tunnel

I've been Googling for a while and I'm not sure it could solve my problem.

I use mongoose and it tells me :

Error : failed to connect to kahana.mongohq.com:10063

I'm stuck cause I really don't wanna use a Local Instance of MongoDB when developping my app at school.

Can anyone help me?

Thanks

Radioreve
  • 3,173
  • 3
  • 19
  • 32

1 Answers1

0

I'm by no means a Node.JS expert, but I just used this and it's incredibly easy to setup, check it out.

https://www.npmjs.org/package/tunnel-ssh

Just as it says, require it in your app after install:

npm install tunnel-ssh

And let us know how that worked out.

gmslzr
  • 1,211
  • 1
  • 10
  • 15
  • Thanks, looks promising but I guess it's incredibly easy to setup for thoses who understand Networks 101, which is not my case. I guess remote port is the port in my DB URI, local port is where my local server is listening at, but what about the rest of config params? host, user, keyphrase etc? – Radioreve Sep 12 '14 at 14:39
  • Alright @Radioreve , let's walk you through it, first check with Compose.io if they allow ssh tunneling. – gmslzr Sep 12 '14 at 16:18
  • Actually I did and yes they do. But it requires to have an ssh server installed somewhere and I don't know if i'm able to setup one, or if I can find/rent any fully configured for me – Radioreve Sep 13 '14 at 12:11