1import Exa from "npm:exa-js";
2
3const exaSecret = Deno.env.get("EXA_API_KEY");
4const exa = new Exa(exaSecret);
5
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans
27 <head>
28 <title>SQLite Explorer</title>
29 <link rel="preconnect" href="https://fonts.googleapis.com" />
30
31 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
32 <link
33 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
34 rel="stylesheet"
35 />
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12
28Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
29Start your response with a comment explaining how your approach will work, what libraries or
30API calls you will use, and any tradeoffs you're making. Then write the code in a consise way,
31the simplest way to achieve the goal, though you can add some inline comments to explain your
32reasoning (not for every line, but for major groups of lines). Don't use any environment variables
33unless strictly necessary, for example use APIs that don't require a key, prefer internal function
34imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
35functions where possible. Unless specified, don't add error handling,
36make sure that errors bubble up to the caller.
28Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
29Start your response with a comment explaining how your approach will work, what libraries or
30API calls you will use, and any tradeoffs you're making. Then write the code in a consise way,
31the simplest way to achieve the goal, though you can add some inline comments to explain your
32reasoning (not for every line, but for major groups of lines). Don't use any environment variables
33unless strictly necessary, for example use APIs that don't require a key, prefer internal function
34imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
35functions where possible. Unless specified, don't add error handling,
36make sure that errors bubble up to the caller.
28Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
29Start your response with a comment explaining how your approach will work, what libraries or
30API calls you will use, and any tradeoffs you're making. Then write the code in a consise way,
31the simplest way to achieve the goal, though you can add some inline comments to explain your
32reasoning (not for every line, but for major groups of lines). Don't use any environment variables
33unless strictly necessary, for example use APIs that don't require a key, prefer internal function
34imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
35functions where possible. Unless specified, don't add error handling,
36make sure that errors bubble up to the caller.
29Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
30Start your response with a comment explaining how your approach will work, what libraries or
31API calls you will use, and any tradeoffs you're making. Then write the code in a consise way,
32the simplest way to achieve the goal, though you can add some inline comments to explain your
33reasoning (not for every line, but for major groups of lines). Don't use any environment variables
34unless strictly necessary, for example use APIs that don't require a key, prefer internal function
35imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
36functions where possible. Unless specified, don't add error handling,
37make sure that errors bubble up to the caller.
28Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
29Start your response with a comment explaining how your approach will work, what libraries or
30API calls you will use, and any tradeoffs you're making. Then write the code in a consise way,
31the simplest way to achieve the goal, though you can add some inline comments to explain your
32reasoning (not for every line, but for major groups of lines). Don't use any environment variables
33unless strictly necessary, for example use APIs that don't require a key, prefer internal function
34imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
35functions where possible. Unless specified, don't add error handling,
36make sure that errors bubble up to the caller.
28Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
29Start your response with a comment explaining how your approach will work, what libraries or
30API calls you will use, and any tradeoffs you're making. Then write the code in a consise way,
31the simplest way to achieve the goal, though you can add some inline comments to explain your
32reasoning (not for every line, but for major groups of lines). Don't use any environment variables
33unless strictly necessary, for example use APIs that don't require a key, prefer internal function
34imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
35functions where possible. Unless specified, don't add error handling,
36make sure that errors bubble up to the caller.