1
2
3
4
5
6
7
8
9
10
11
import { myTestForm } from "https://esm.town/v/stevekrouse/myTestForm";
import { email } from "https://esm.town/v/std/email?v=9";
export async function handleFormExample(req, res) {
await email({
text: JSON.stringify(req.query, null, 2),
subject: "New form submission",
});
myTestForm.push(req.query);
return res.send(`<h1>Hi ${req.query.first} ${req.query.last}!</h1>`);
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023