FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
g

g

serveUtils

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
/
README.md
Code
/
README.md
Search
8/28/2024
Viewing readonly version of main branch: v2
View latest version
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

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.