Static files

By default, nothing is served statically, but if you want to statically serve some content from a folder, you can do so by specifying path to the folder, in a Config object.

/**@jsx h */
/**@jsxFrag Fragment */
import { serve } from 'https://deno.land/std/http/server.ts'
import { createHandler, Config, h, Fragment } from 'https://deno.land/x/atlet@1.2.0/mod.ts'

const config: Config = {
  static: './static',
}

const handler = await createHandler({
  '/': () => <img src="/cat.png" alt="an ordinary cat basically" />
}, config)

// you can also use Deno.serve which is available in Deno 1.35
serve(handler)

For example, this cat was loaded from the static folder in this documentation.an ordinary cat basically