how to connect another machine mongodb database inside local network ?

后端 未结 3 1843
傲寒
傲寒 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:33

    Try without the Port no.

    mongoose.connect('mongodb://192.168.1.100/waterDB');
    

    this should work for you.

    But make sure both are connected on the same network, if you are connected on other network than your server is, then it wont work

提交回复
热议问题