With pinggy.io you can share your MongoDB server from localhost with just a single command. Replace the port 27017 with the port where your server is running.
Pinggy will give you a URL like tcp://ranfjyszvqyxz.a.pinggy.link:42555
. Use this URL to access the server.