1
2
3
4
5
6
7
8
import { myTestForm } from "https://esm.town/v/octref/myTestForm";
// View at https://api.val.town/v1/express/stevekrouse.expressHTMLExample?name=Steve
export async function expressHTMLExample(req: express.Request, res: express.Response) {
myTestForm.push(req.query.name || req.body.name);
return res.send(`<h1>Hi ${req.query.name || req.body.name}!</h1>`);
}
// Forked from @stevekrouse.expressHTMLExample
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.