FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
vawogbemi
vawogbemiaaa
Remix of vawogbemi/denoVite
Public
Like
aaa
Home
Code
7
public
2
src
6
README.md
deno.json
index.html
H
server.tsx
S
vite.config.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Settings
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Vite + Deno + React + TypeScript + Val Town

A Vite project running on Val Town. The server.tsx serves the project. If you make any edits the server will rebuild on the next request. All code is built using Deno on a separate build+proxy server. You can view the source here: https://github.com/maxmcd/vite-proxy

Server implementation

The vite build server is a proxy. Any HTTP Val request is proxied to the build server:

Create val
const projectVal = parseProject(import.meta.url); export default async function(req: Request): Promise<Response> { const url = new URL(req.url); const path = `/${projectVal.username}/${projectVal.name}@${projectVal.version}${url.pathname}`; const proxyUrl = new URL(path, "https://vite-proxy.ng-demo.valtown.net").toString(); const response = await fetch(proxyUrl);

When a request is recieved, the proxy downloads the entire project source (it can't be private) and builds it using Deno. Once the build is complete, all resulting files are cached and served quickly for future requests.

Code
publicsrcREADME.mddeno.jsonindex.html
H
server.tsx
S
vite.config.ts
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.