@elysiajs/html
v1.4.2
Published
Elysia plugin to render HTML
Downloads
43,733
Readme
@elysia/html
Elysia plguin to render HTML.
Installation
bun add @elysia/htmlExample
import { Elysia } from 'elysia'
// 'Html' is required for JSX support but not required for string HTML
import { html, Html } from '@elysia/html'
new Elysia()
.use(html())
.get(
'/html',
() => `
<html lang='en'>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>`
)
.get('/jsx', () => (
<html lang="en">
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
))
.listen(3000)See documentation for more details.
