Sending HTML
Return HTML as a response
import { Router } from '@stricjs/router';
import { html } from '@stricjs/utils';
const page = `<html>
<body>
<h1>Hi</h1>
<body>
</html>`;
export default new Router()
.get('/', () => html(page));import { Router } from '@stricjs/router';
import { createHTML } from '@stricjs/utils';
const html = createHTML({ status: 404 });
const page = `<html>
<body>
<h1>Page not found</h1>
<body>
</html>`;
export default new Router()
.get('/404', () => html(page));Last updated