@voks/voks-express
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

voks web elements

Release History

https://github.com/voks-templating/voks-express/releases

Usage

deno

import {
  html,
  type HTMLTemplate,
  renderToStream,
  type ResponseStream,
} from "voks";
import voksExpress from "https://deno.land/x/voks_express/mod.ts";

const app = express();

app.use(
  voksExpress<HTMLTemplate, ResponseStream>(renderToStream, { timeout: 50 }),
);

app.get("/", (_req: express.Request, res: express.Response) => {
  const message = "Hello, World!";

  res.render(html`<!DOCTYPE html>
    <html>
      <head>
        <title>Deno Express App for testing VoksExpress</title>
      </head>
      <body>
        <h1>${message}</h1>
      </body>
    </html>`);
});

License

Apache-2.0

Readme

Keywords

none

Package Sidebar

Install

npm i @voks/voks-express

Weekly Downloads

1

Version

1.1.6

License

Apache-2.0

Unpacked Size

6.19 kB

Total Files

6

Last publish

Collaborators

  • falkintheclouds