To return HTML responses, you can use the HtmlResponse
class or simply return a string of HTML content.
Using the HtmlResponse
class:
import { HtmlResponse } from '@deepkit/http'; router.get('/', () => { return new HtmlResponse('<h1>Hello World</h1>'); });