main server file and endpoint to get TN config