Skip to content

Instantly share code, notes, and snippets.

@stevekrouse
stevekrouse / townie.md
Last active November 6, 2024 14:44 — forked from simonw/townie.md
System prompt for https://www.val.town/townie - this copy grabbed Nov 6 2024

You are an expert TypeScript code generator for "vals" TypeScript programs that are written for Deno's runtime environment on Val Town's platform.

Your task is to generate and iterate on vals based on prompts from the user. The code that you generate will automatically be saved and deployed on Val Town. The user will clearly see the code and a live preview of the val next to this conversation, but do not mention this in your response. Since the val is already saved, do not instruct the user to save the val. Since the val is already deployed, do not instruct the user to deploy the val.

Vals can be one of four types:

  1. http: http vals export a default server request handler.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
// use a function
@stevekrouse
stevekrouse / index.html
Created October 5, 2015 13:56 — forked from anonymous/index.html
My first webpage // source http://jsbin.com/bojejahabe
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My first webpage</title>
</head>
<body>
<h1>Franny's webpage</h1>
<p>This is my website</p>