'Difficulty in accessing mongodb from other devices in the LAN

I am using mongoose to connect mongodb from nodejs express app. When I access the app from another device in the same network, the login process does not work. I am assuming it's because the MongoDB is not allowing requests from other device (correct me if I am wrong).

At the same time I am confused as I thought express is a server side program so nothing is in client side.

If my assumption is right, how do i connect mongodb port from other device within the same network?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source