A small server to get last news from https://newsapi.org
Using HTTPS:
git clone https://github.com/manuelczs/news-server.git
*You need to have NPM and Node.js installed on your PC
When cloning finished, navigate to the folder news-server typing:
cd your-folder-path/news-server
and then type:
npm install
to install all dependencies
After you've installed dependencies create a .env file and put on it the PORT variable (ex: PORT=3000) and in API_KEY the api key you've got from https://newsapi.org
It looks something like this:
.env
PORT=3000
API_KEY=yOurApIKEyExAmplE
Now you can run the server:
npm run start
This script will run the server at the following address:
https://localhost:3000
Now you can test the server using a browser or Postman with the address https://localhost:3000