FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
g
gserveUtils
Public
Like
serveUtils
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Serve Utils

This val exports various utility functions, mainly the serve(commentFunction, contentType?).
It enables easy serving of different files, while allowing the use of all string characters:

Create val
// this is possible const arr = ["Hello", 'world', `!`];

Townie Prompt

This can be used as a replacement system prompt for Townie. Townie will:

  • Write client-side applications with vanilla JavaScript
  • Serve them as different assets, ie. index.html, style.css and main.js
  • Use modern module syntax, including importing modules directly from esm.sh on the client side
  • Not reuse the same script for the server and client logic

IMPORTANT:

Due tue val.town README restrictions, the custom prompt can now be found here.

Migrated from folder: util/serveUtils

Code
README.mdmain.tsx
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.