I had added code in js file for both case
- Deployment: As API doesn't work on deployment i had saved a sample data as text in file and used for showing
- Development server: The code for development server is commented in js file , uncomment it and use it locally to get latest news through api cal Here is preview of the Newsapi project
Happy Coding:)