How to set up mobile server before building or after buildin or on building the apk

Please can you help me with this problem.
Basically I build an app but I can’t figure out how to connect to my server, mongo. Which is hosted on mLab.

Please can you help how to specify mongo url before building the apk.

Thank you so much.