import { Application, Router } from 'https://deno.land/x/oak/mod.ts'; import { buildAPI } from './restapi.ts'; import { DenoKVFileService } from "./fileservice.ts"; async function main(){ const app = new Application(); const kv = await Deno.openKv(); const fileService = new DenoKVFileService(kv); const router = new Router({ prefix: '/v1' }); app.use( buildAPI(router, fileService).routes(), ); await app.listen({ port: 9000 }); } await main();