FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
vtTestLocal
vtTestLocala14a9ff1f83_
Public
Like
a14a9ff1f83_
Home
Code
28
dailyBriefing
3
dashboard
4
dbUtils
4
importers
5
shared
1
.cursorrules
README.md
backstory.ts
file0-3eaf92f3-6868-4aa4-b37a-fbfbf5ff6949.txt
file1-338d8cf4-8847-4a5f-8b80-2b3ccfc20972.txt
file10-1044b628-01c9-4857-9321-cbc8115dd825.txt
file11-83ae8148-c395-44e5-ade7-0256aff2b2a7.txt
file12-cef6d489-a4ae-42d6-89ce-d920afa7d25c.txt
file13-81de1257-d753-49e9-ba52-3a921a7a6f2c.txt
file14-371a46f3-9bf9-4b95-bb2a-4b645330a836.txt
file15-c306bf5b-8067-4300-a220-06d26c8c2c67.txt
file16-90711d95-1b90-4c0a-9e14-e4c7af34e4ee.txt
file17-04c3c6b7-e357-45ad-920d-33e84a13c0de.txt
file2-eb84c83a-8193-4088-98fc-e024b35bfb12.txt
file3-1fd15d86-542e-4bb4-9bec-24751533a2cf.txt
file4-2a5d16fc-3c8d-4fb4-b957-4b586eac2408.txt
file5-ac5e6385-615d-4cb6-9801-038a9b43303e.txt
file6-143d83b6-aba4-442c-a7fc-0eea70281b91.txt
file7-2ee93f25-5eb8-4cb7-a98d-ea7dcbd82c02.txt
file8-6c289a5f-3e36-437d-a527-fefc63cef377.txt
file9-6d49373a-59d9-419c-9aac-6004ebcfca18.txt
memoryUtils.ts
populateDemo.ts
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
/
dashboard
/
shared
/
README.md
Code
/
dashboard
/
shared
/
README.md
Search
5/4/2025
Viewing readonly version of main branch: v67
View latest version
README.md

Shared

It's common to have code and types that are needed on both the frontend and the backend. It's important that you write this code in a particularly defensive way because it's limited by what both environments support:

shapes at 25-02-25 11.57.13.png

For example, you cannot use the Deno keyword. For imports, you can't use npm: specifiers, so we reccomend https://esm.sh because it works on the server & client. You can use TypeScript because that is transpiled in /backend/index.ts for the frontend. Most code that works on the frontend tends to work in Deno, because Deno is designed to support "web-standards", but there are definitely edge cases to look out for.

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.