Skip to content

Commit

Permalink
htm + vhtml are indeed too simple
Browse files Browse the repository at this point in the history
they insist on html-encoding the JS characters
  • Loading branch information
jessitron committed Jul 5, 2024
1 parent 46cb615 commit 0eace27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"workbench.colorTheme": "Monokai"
}
14 changes: 14 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,24 @@ app.listen(port, () => {
app.get("/", (req, res) => {
console.log("here we are at /");
const element = html`<html>
<head>
<script src="https://unpkg.com/@jessitronica/[email protected]/dist/hny.js"></script>
${javascriptToStartTracing}
</head>
<body>
<h1>Welcome to Jessitron's Honeycomb Tricks</h1>
</body>
</html>`;
console.log(element);
res.send(`<!DOCTYPE html>${element}`);
});

const javascriptToStartTracing = `<script>
console.log("I am the script yo");
Hny({
apiKey:
"hcaik_01j229z3ezkranjdcgj7e5dvx4vz4prbbkkbgx4rnv4strm0kb485sae9f",
serviceName: "hny-tricks-web",
debug: true,
});
</script>`;

0 comments on commit 0eace27

Please sign in to comment.