Skip to content

mountainash/CycleTreks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CycleTreks

A visual diary of your cycle adventures

About

Strava is good for tracking single-activity GPS & fitness logs. This project seeks to combine multiple single activities into a multi-day adventure journal.

Using a Cloudflare Worker to connect to the Strava API and pull concurrent cycle logs and combine them into a single journey.

Dependencies

Use

  1. Create a new Worker and save the content from ./worker/index.js into your script (note the URL)
  2. Get a Strava access_token by creating an application at https://www.strava.com/settings/api
  3. Visit your running Worker in a web browser and authorise your app

Running locally

Setup

  1. npm install
  2. cp .env.example .env
  3. Edit .env with keys and IDs from your Strava Application settings
  4. npm run worker:init to put the details from .envinto worker/wrangler.toml (https://developers.cloudflare.com/workers/platform/environment-variables#adding-environment-variables-via-wrangler)
  5. wrangler login (optional for easier deployment with npm run worker:publish, but before publishing your code you need to edit wrangler.toml file and add your Cloudflare account_id)

Develop

npm run worker:dev
npm run worker:tail # for logs from the remote Worker - good for callbacks

Resources