Setting NewsAPIConnection for both local and cloud deployment in the web worker and the background worker.