Integration & Deployment

Integration with Deno

Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust (opens in a new tab). We will use fets which has an agnostic HTTP handler using Fetch API (opens in a new tab)'s Request (opens in a new tab) and Response (opens in a new tab) objects.


Create a deno-fets.ts file:

import { createRouter, Response } from ''
import { serve } from ''
const router = createRouter().route({
  method: 'GET',
  path: '/greetings',
  schemas: {
    responses: {
      200: {
        type: 'object',
        properties: {
          message: {
            type: 'string'
        required: ['message'],
        additionalProperties: false
  } as const,
  handler: () => Response.json({ message: 'Hello World!' })
serve(router, {
  onListen({ hostname, port }) {
    console.log(`SwaggerUI -> http://${hostname}:${port}/docs`)

And run it:

deno run --allow-net index.ts

You can also check a full example on our GitHub repository here (opens in a new tab)