/cf-shuttle-tracker

A simple Shuttle Tracker system that runs on CloudFlare Workers. Made with <3 for BLFC.

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

🚏🚌 Shuttle Tracker on CF Workers

A simple Shuttle Tracker system that runs on CloudFlare Workers. Made with <3   for BLFC! Still a work in progress!

Development Setup

Prerequisites

  • Node.js and npm
  • ...that's about it for now! There'll be an Android companion app soon.
  • A CloudFlare Workers account for deploying the app.

Deployment

CloudFlare Workers

Environments

A production environment will be created automatically when you create a new CloudFlare Worker. We'd strongly recommend creating a development environment so you can test / debug your app without affecting the production environment.

Workers KV Setup

You'll need to create two KV namespaces: ShuttleStops and Shuttles. These will be used for storing information about the system.

Ensure these are bound to the service in CloudFlare Workers by clicking on the Settings tab, then Variables, then the Edit Variables button. Then add the following:

  • Variable Name SHUTTLES and KV Namespace Shuttles
  • Variable Name STOPS and KV Namespace ShuttleStops
Code Deployment

Take the output from the npm run build command (you can find that in dist/index.js) and upload it to your CloudFlare Worker.

Suggestions / Feedback

If you've got an idea, found a mistake, or otherwise have some feedback you'd like to share, please create an issue to let us know. Or, if you're feeling up to it, you can always create a pull request with your changes! (We don't bite!)

License

Licensed under the GNU Affero General Public License v3.0 (https://spdx.org/licenses/AGPL-3.0-or-later.html). Feel free to use this code for whatever you want, but please give back to the community and credit us if you do.

© 2022 Adam Walker (@Crashdoom)

Cloudflare Workers with TypeScript and Webpack by Udacity. © 2019 Udacity, Inc.

Content derived from Cloudflare Developer Documentation. © 2022 Cloudflare, Inc.