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