GithubHelp home page GithubHelp logo

planetscale / f1-championship-stats Goto Github PK

View Code? Open in Web Editor NEW
130.0 20.0 4.0 24.84 MB

๐ŸŽ

Home Page: https://f1.planetscale.com

License: Apache License 2.0

TypeScript 78.79% JavaScript 14.45% CSS 6.76%
edge formula1 mysql typescript

f1-championship-stats's Introduction

F1 Championship Stats ๐ŸŽ

See how your favorite F1 team is progressing in the Constructors Championship using the PlanetScale serverless driver for JavaScript and edge functions.

CleanShot 2022-08-17 at 14 03 04@2x

How it works

All of the data for this application is returned through edge functions from various providers (Cloudflare Workers, Vercel Edge Functions, Netlify Edge Functions). Read more about the benefits of the PlanetScale serverless driver for JavaScript and the next generation of PlanetScale infrastruction in our latest blog post.

Each of these edge functions connects to a PlanetScale database via our serverless driver, @planetscale/database, and returns a JSON payload with F1 stats to render the page.

You can use these as examples for how to start using your PlanetScale database from an edge function.

The frontend application is a Next.js app running on Vercel.

Local development

To run the frontend (UI).

npm install
npm run dev

Visit http://localhost:3000 in your browser.

Edge functions

To learn more about how to run each function, visit the subdirectories for each:

Thank you โค๏ธ

The F1 stats shown in this application are from the Ergast Developer API.

License

The project is available as open source under the terms of the Apache-2.0 license.

f1-championship-stats's People

Contributors

ayrton avatar dependabot[bot] avatar iheanyi avatar jakechampion avatar jasonlong avatar jgreet avatar mattrobenolt avatar mscoutermarsh avatar nickvanw avatar pixeljanitor avatar skullface avatar tbarn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

f1-championship-stats's Issues

Haas F1 points not rendering on last race in leaderboard

image

There seems to be a part of the leaderboard glitching on the last race of the 2022 season, Nov 20 (seen above). It looks like the points count for Haas F1 list item isn't rendering points, but ending up rank 9.

Steps to reproduce:

  1. Click the Nov 20 button in the race timeline
  2. View the leaderboard

Expected Result:

  • Haas F1 should be rank 8 with 37 points

Actual Result:

  • Haas F1 is rank 9 with blank points

Fetch Failed for db Client

Great work on this team!!

Following the example here gives me "Fetch failed" error when I'm trying to do it in Next.js API routes:

error - Error [TypeError]: fetch failed
    at Object.processResponse (evalmachine.<anonymous>:3033:34)
    at <unknown> (evalmachine.<anonymous>:3366:42)
    at <unknown> (node:internal/process/task_queues:141:7)
    at AsyncResource.runInAsyncScope (node:async_hooks:199:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:138:8)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

However when I switched to the example in the blog post with import { connect } from "@planetscale/database"; it worked.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.