More or less finalized the REST api.
This commit is contained in:
1 parent
872f841d74
commit
95e58a67df
5 files changed
+159
-7
No files matched your search
+3
-1
@@ -1,15 +1,17 @@
|
||||
import { Application, Router } from './deps.ts';
|
||||
import { buildAPI } from './restapi.ts';
|
||||
import { DenoKVFileService } from './services/mod.ts';
|
||||
import { WaveFrontServiceImpl } from './services/wavefrontService.ts';
|
||||
|
||||
async function main() {
|
||||
const app = new Application();
|
||||
const kv = await Deno.openKv();
|
||||
const fileService = new DenoKVFileService(kv);
|
||||
const waveFrontService = new WaveFrontServiceImpl();
|
||||
const router = new Router({ prefix: '/v1' });
|
||||
|
||||
app.use(
|
||||
buildAPI(router, fileService).routes(),
|
||||
buildAPI(router, fileService, waveFrontService).routes(),
|
||||
);
|
||||
|
||||
await app.listen({ port: 9000 });
|
||||
|
||||
Reference in new issue
Block a user