Build a dinosaur runner game with Deno, pt. 4 Based on the article, this is the fourth installment in a series about building a browser-based dinosaur runner game using Deno. The post focuses on integrating a PostgreSQL database to persist player scores, creating API endpoints for submitting and ranking scores, and building a dedicated leaderboard page that auto-refreshes with live data. The tutorial includes step-by-step instructions for setting up the database, creating the HTML leaderboard page with CSS styling, and wiring up the necessary server-side routing in the main application file. Build a dinosaur runner game with Deno, pt. 4 This series of blog posts will guide you through building a simple browser-based dinosaur runner game using Deno. Setup a basic project Game loop, canvas, and controls Obstacles and collision detection Databases and global leaderboards - Player profiles, customization, and live tuning - Observability, metrics, and alerting Database Integration & Global Leaderboards Now that we have a fully playable endless runner, it is time to persist scores. In this post, we will add a database, expose a leaderboard API, and render those rankings inside the UI. Later we can build on this foundation to add player profiles and make the leaderboard global across multiple sessions and devices. What youโ€™ll learn By the end of this stage you will have: - Set up a PostgreSQL database locally and in Deno Deploy . - Created API endpoints to submit, fetch, and rank player scores. - Built a dedicated leaderboard page that auto-refreshes with live data. 1. Build the leaderboard page Weโ€™ll start by creating a new HTML page to display the leaderboard. For now this will only display your top score, but in later stages we will enhance it with global rankings once we introduce player profile settings. Create a new file called public/leaderboard.html and add the following: < DOCTYPE html