NextJS webapp for tracking and displaying the results of our golf games.
Contributions from Weekday Golf participants are welcome. You should already have access to evrything you need.
Clone the repo locally and install dependencies:
$ git clone git@github.com:ericgio/weekday-golf.git
$ cd weekday-golf
$ yarn install
The app requires a couple env variables, which you can get from Eric G. or from the Heroku app.
$ cp .env.example .env
Add the env vars to the .env
file.
$ yarn dev
This script will build the static data, bundle the app, and start a local server. The location defaults to localhost:3000
but you can change this by changing the $PORT
variable to something else.
Data from all the rounds are stored in a Google spreadsheet that everyone should be able to edit.
To add new data:
The app doesn't pull data from the spreadsheet on each page load. Instead, there is a build step that parses the spreadsheet, transforms the data, and generates 2 static JSON files to be used by the app for displaying the data. You can run this manually with yarn run data
. On Heroku, the step will run automatically whenever the app is redeployed.
The Heroku app is connected to the Github repo and should automatically redeploy whenever a commit is pushed to master
. If you just want to update the data, (eg: after adding a new round to the spreadhseet), redeploy the app manually by going to the "Deploy" tab in Heroku, scrolling to the bottom, and clicking the "Deploy Branch" button.