Public
HTTP
Forked from pomdtr/react_example
nbbaier-react_example_server.web.val.run
April 18, 2024
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// The server response includes a script referencing the client val
export const server = (req) =>
new Response(
`<html>
<head>
<title>React Example</title>
</head>
<body>
<main id="root"></main>
<script type="module" src="https://esm.town/v/nbbaier/react_client"></script/>
</body>
</html>`,
{
headers: {
"Content-Type": "text/html",
},
},
);
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!
April 18, 2024