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.envfile to.env. - In
.env, set theclub_idto the desired Strava club id (ex:itchalmerslop) and set thehook_tokento a Slack incoming web hook token to be used (could also print to command line while developing). - Install dependencies with
npm installRun the script with
node src/refresh_tokens.js # Creates/Refreshes tokens.json
node src/index.js # Posts to slack