5// Copied from https://www.val.town/v/sqlite/db
6async function execute(statement: InStatement): Promise<ResultSet> {
7 const resp = await fetch("https://janpaul123-dummyjustproxylibsql.web.val.run", {
8 method: "POST",
9 body: JSON.stringify({
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
15import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=70";
16import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
17import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
18import { Hono } from "npm:hono";
19import type { FC } from "npm:hono/jsx";
174});
175
176export const handler = app.fetch;
177export default iframeHandler(modifyFetchHandler(passwordAuth(handler)));
74});
75
76export default app.fetch;
30 event.preventDefault();
31 const formData = new FormData(form);
32 const response = await fetch('/', {
33 method: 'POST',
34 body: formData,
43 event.preventDefault();
44 const formData = new FormData(form);
45 const response = await fetch('/', {
46 method: 'POST',
47 body: formData,
134 event.preventDefault();
135 const formData = new FormData(form);
136 const response = await fetch('/', {
137 method: 'POST',
138 body: formData,
147 event.preventDefault();
148 const formData = new FormData(form);
149 const response = await fetch('/', {
150 method: 'POST',
151 body: formData,
217});
218
219export default valTownBadge(app.fetch, import.meta.url);
31});
32
33export default app.fetch;
30 event.preventDefault();
31 const formData = new FormData(form);
32 const response = await fetch('/', {
33 method: 'POST',
34 body: formData,
43 event.preventDefault();
44 const formData = new FormData(form);
45 const response = await fetch('/', {
46 method: 'POST',
47 body: formData,
135 event.preventDefault();
136 const formData = new FormData(form);
137 const response = await fetch('/', {
138 method: 'POST',
139 body: formData,
148 event.preventDefault();
149 const formData = new FormData(form);
150 const response = await fetch('/', {
151 method: 'POST',
152 body: formData,
219});
220
221export default valTownBadge(app.fetch, import.meta.url);
26});
27
28export default app.fetch;
4app.get("/", (c) => c.text("Hello from Hono!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export async function reminders(interval: Interval) {
14 const comingUp = [];
15 // Parsed markwhen document
16 const response = await fetch("https://markwhen.com/rob.json");
17 const mw = await response.json();
18 // Alternatively, fetch a plaintext markwhen document from somewhere and parse it
19 /*
20 const response = await fetch("https://raw.githubusercontent.com/kochrt/kochrt.github.io/master/resume.mw")
21 const { parse } = await import("@markwhen/parser")
22 const mw = parse(await response.text())
151 this.prompt = ''; // Clear the input field
152 this.generatedText = ''; // Reset generatedText
153 const response = await fetch('/', {
154 method: 'POST',
155 headers: { 'Content-Type': 'application/json' },
173 console.log('Creating New Character:', charObj)
174
175 const response = await fetch('/', {
176 method: 'POST',
177 headers: { 'Content-Type': 'application/json' },
192 char = JSON.parse(event.target.innerText);
193 console.log('Updating Character:', char)
194 const response = await fetch('/', {
195 method: 'POST',
196 headers: { 'Content-Type': 'application/json' },
214 async loadCharacter(charId) {
215 this.generatedText = 'Loading character...'; // Inform user about character loading
216 const response = await fetch('/', {
217 method: 'POST',
218 headers: { 'Content-Type': 'application/json' },
282
283
284export default app.fetch;