From 843a1394d80ca327ac99b449da4610b4e8bb9bba Mon Sep 17 00:00:00 2001 From: Ayooluwa Isaiah Date: Wed, 18 Nov 2020 11:16:04 +0100 Subject: [PATCH] Update README and add example env --- .env.example | 2 ++ README.md | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..51deef0 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +PORT=3000 +NEWS_API_KEY= diff --git a/README.md b/README.md index 13ba2e9..2a471eb 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,13 @@ The code in this repo is meant to be a reference point for anyone following alon ## Prerequisites -- You need to have Go installed on your computer. The version used for the tutorial is **1.12.9**. +- You need to have Go installed on your computer. The version used for the tutorial is **1.15.3**. - Sign up for a [News API account](https://newsapi.org/register) and get your free API key. ## Get started - Clone this repository to your filesystem. - -- `cd` into it and run the following command: `go run main.go -apikey=` to start the server on port 3000. - -- View http://localhost:3000 in your browser. +- Rename the `.env.example` file to `.env` and enter your News API Key. +- `cd` into it and run the following command: `go build && ./news-demo` to start the server on port 3000. +- Visit http://localhost:3000 in your browser.