how to connect another machine mongodb database inside local network ?

后端 未结 3 1880
傲寒
傲寒 2021-01-05 11:00

I follow this mongoose document enter link description here

mongoose.connect(\'mongodb://localhost/waterDB\');

Using This, I can connect lo

3条回答
  •  忘掉有多难
    2021-01-05 11:31

    You will have to use SSH tunnel in this case. Refer to the following link which shows how you can create SSH tunnel.
    Node.js SSH Tunneling to MongoDB using Mongoose

提交回复
热议问题