12);
13
14export default function Page() {
15 return (
16 <>
66 lines: 60,
67 branches: 70,
68 functions: 63,
69 statements: 60,
70 },
20});
21
22function buildDev(config) {
23 return build({
24 ...config,
30}
31
32function buildProd(config) {
33 return build({
34 ...config,
23});
24
25function buildDev(config) {
26 return build({
27 ...config,
34}
35
36function buildProd(config) {
37 return build({
38 ...config,
40});
41
42function buildDev(config) {
43 return build({
44 ...config,
50}
51
52function buildProd(config) {
53 return build({
54 ...config,
61 <script>
62 try {
63 function setTheme(theme) {
64 if (theme === "dark") {
65 document.documentElement.classList.add("dark");
69 }
70
71 function getTheme() {
72 const theme = window.localStorage.getItem("excalidraw-theme");
73
146 {
147 const _WebSocket = window.WebSocket;
148 window.WebSocket = function (url) {
149 if (/ws:\/\/localhost:.+?\/sockjs-node/.test(url)) {
150 console.info(
3
4VITE_APP_LIBRARY_URL=https://libraries.excalidraw.com
5VITE_APP_LIBRARY_BACKEND=https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries
6
7VITE_APP_PLUS_LP=https://plus.excalidraw.com
4import { DateTime } from "https://esm.sh/luxon@3.4.4";
5
6export async function testDailyBrief() {
7 try {
8 const testChatId = Deno.env.get("TEST_TELEGRAM_CHAT_ID");
2// Run this script manually to create the database table
3
4export default async function setupTelegramChatDb() {
5 try {
6 // Import SQLite module
16In a normal server environment, you would likely use a middleware [like this one](https://hono.dev/docs/getting-started/nodejs#serve-static-files) to serve static files. Some frameworks or deployment platforms automatically make any content inside a `public/` folder public.
17
18However in Val Town you need to handle this yourself, and it can be suprisingly difficult to read and serve files in a Val Town Project. This template uses helper functions from [stevekrouse/utils/serve-public](https://www.val.town/x/stevekrouse/utils/branch/main/code/serve-public/README.md), which handle reading project files in a way that will work across branches and forks, automatically transpiles typescript to javascript, and assigns content-types based on the file's extension.
19
20### `index.html`
26## CRUD API Routes
27
28This app has two CRUD API routes: for reading and inserting into the messages table. They both speak JSON, which is standard. They import their functions from `/backend/database/queries.ts`. These routes are called from the React app to refresh and update data.
29
30## Errors
A helper function to build a file's email
Simple functional CSS library for Val Town
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.