1
2
3
4
5
// View at https://stevekrouse-expressHTMLExample.express.val.run?name=Steve
export async function exampleData(req: express.Request, res: express.Response) {
return res.send(JSON.stringify({ data: [0, 1, 2, 3, 4, 5, 6] }));
}
// Forked from @stevekrouse.expressHTMLExample
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.