22Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
23Start your response with a comment explaining how your approach will work, what libraries or
24API calls you will use, and any tradeoffs you're making. Then write the code in a consise way,
25the simplest way to achieve the goal, though you can add some inline comments to explain your
26reasoning (not for every line, but for major groups of lines). Don't use any environment variables
27unless strictly necessary, for example use APIs that don't require a key, prefer internal function
28imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
29functions where possible. Unless specified, don't add error handling,
30make sure that errors bubble up to the caller.
18Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
19Start your response with a comment explaining how your approach will work, what libraries or
20API calls you will use, and any tradeoffs you're making. Then write the code in a concise way,
21the simplest way to achieve the goal, though you can add some inline comments to explain your
22reasoning (not for every line, but for major groups of lines). Don't use any environment variables
23unless strictly necessary, for example, use APIs that don't require a key, prefer internal function
24imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
25functions where possible. Unless specified, don't add error handling,
26make sure that errors bubble up to the caller.
2 const styles = `
3 <style>
4 @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
5 body {
6 background: linear-gradient(90deg, #f3ec78, #af4261);
10 <title>Crazy Wordle</title>
11 <style>
12 @import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');
13 body {
14 font-family: 'Pacifico', cursive;
1Fork it and authenticate with your Val Town API token as the password. Needs an `OPENAI_API_KEY` env var to be set.
2
3WARNING: pollutes your homepage with lots of temporary vals!!
24Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
25Start your response with a comment explaining how your approach will work, what libraries or
26API calls you will use, and any tradeoffs you're making. Then write the code in a consise way,
27the simplest way to achieve the goal, though you can add some inline comments to explain your
28reasoning (not for every line, but for major groups of lines). Don't use any environment variables
29unless strictly necessary, for example use APIs that don't require a key, prefer internal function
30imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
31functions where possible. Unless specified, don't add error handling,
32make sure that errors bubble up to the caller.
15 <meta name="viewport" content="width=device-width, initial-scale=1.0">
16 <title>Crazy Wordle</title>
17 <link href="https://fonts.googleapis.com/css?family=Creepster|Permanent+Marker&display=swap" rel="stylesheet">
18 <style>
19 body {
17 <title>Hello World</title>
18 <style>
19 @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&display=swap');
20 body {
21 font-family: 'Raleway', sans-serif;
19 <title>Hello World</title>
20 <style>
21 @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');
22
23 body {
1// This HTTP val responds with "Hello, world!" in JSON format.
2// It leverages the Web API which provides Request and Response objects.
3// No external libraries or other dependencies are necessary.
4