A script for posting a leaderboard, fetched from Strava, to a dedicated Slack channel. Running the script on a weekly basis sums up the distance run by each user and posts it as a message in Slack.
- Copy the
example.env
file to.env
. - In
.env
, set theclub_id
to the desired Strava club id (ex:itchalmerslop
) and set thehook_token
to a Slack incoming web hook token to be used (could also print to command line while developing). - Install dependencies with
npm install
Run the script with
node src/refresh_tokens.js # Creates/Refreshes tokens.json
node src/index.js # Posts to slack