formatting and setting ports/server via env