---
title: "A Whole Website in a Single JavaScript File, cont'd"
description: "A complete bagel-search web app with server-side rendered JSX, dynamic routes and form handling fits in one Deno JavaScript file."
url: "https://swe.quest/articles/a-whole-website-in-a-single-javascript-file-cont-d-596fba773a32d01c"
canonical: "https://deno.com/blog/a-whole-website-in-a-single-js-file-continued"
source: "Deno"
published: "2022-09-13"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["javascript","frontend","typescript"]
---

# A Whole Website in a Single JavaScript File, cont'd

A post on [Deno](https://swe.quest/sources/deno.md), published 2022-09-13, 4 min read, How-to. Original: [https://deno.com/blog/a-whole-website-in-a-single-js-file-continued](https://deno.com/blog/a-whole-website-in-a-single-js-file-continued)

## Summary

A complete bagel-search web app with server-side rendered JSX, dynamic routes and form handling fits in one Deno JavaScript file. The landing page looks up the visitor's IP through IP-API to render their city and local time. Per-bagel pages use router's URLPattern-based \`/bagels/:id\` matching. Search is a plain GET form whose querystring the server parses to filter results, so the site needs no client-side JavaScript or build step.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

- JSX
- HTTP request handling
- HTML forms

## Keywords

Deno, Deno Deploy, URLPattern, JSX, IP-API, server-side rendering

## Related posts

- [A Whole Website in a Single JavaScript File](https://swe.quest/articles/a-whole-website-in-a-single-javascript-file-71d46431d0988f5b.md): Deno · 2022-04-05 · Medium · 2 min read · JavaScript, Serverless, CDN & edge, Frontend, TypeScript
  A demo multi-page website fits entirely in one JavaScript file and is server-rendered on demand at the edge with Deno.
- [Build an Astro site with Deno](https://swe.quest/articles/build-an-astro-site-with-deno-cd90d47e8a2fd029.md): Deno · 2024-10-29 · Medium · 4 min read · Frontend, JavaScript, TypeScript
  Deno 2's Node and npm compatibility lets you scaffold and run an Astro project entirely with Deno tooling: \`deno -A npm:create-astro@latest\` to scaffold, \`deno install --allow-scripts\` for dependencies, and \`deno task dev\` to run package.json scripts.
- [Build and Ship Astro Sites with Deno and Deno Deploy](https://swe.quest/articles/build-and-ship-astro-sites-with-deno-and-deno-deploy-3be8936cebaf2b24.md): Deno · 2023-07-21 · Medium · 12 min read · Frontend, Serverless, Deployment, TypeScript
  Astro sites can be built with the Deno runtime and hosted on Deno Deploy in two modes.
- [How to Build a Blog with Fresh](https://swe.quest/articles/how-to-build-a-blog-with-fresh-9e3aca10e6ed3207.md): Deno · 2022-10-25 · Medium · 6 min read · TypeScript, Frontend, Serverless
  A markdown blog can be built with Fresh, Deno's edge-first framework that ships zero client JavaScript by default, using file-based routes, custom GET handlers and server-side rendering.
- [Build a dinosaur runner game with Deno, pt. 1](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-1-e4d3faa91fec67fd.md): Deno · 2025-12-08 · Medium · 5 min read · JavaScript, TypeScript, Deployment, Serverless
  Part one of a series building a browser dinosaur runner game sets up a Deno project that serves static files and deploys it.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
