1
2
3
4
5
6
7
// View at https://stevekrouse-expressHTMLExample.express.val.run?name=Steve
export async function expressHTMLExample(
req: express.Request,
res: express.Response,
) {
return res.send(`<h1>Hi ${req.query.name || req.body.name}!</h1>`);
}
Only the latest version can be previewed
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.