How can we map dgraph to custom port

You can make dgraph listen on a custom port using the --port flag. E.g. to listen on port 6060 you would use --port=6060.

For a full list of flags to use with dgraph, you can run dgraph --help.