init deno
This commit is contained in:
13
mod.ts
Normal file
13
mod.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { STATUS_CODE, STATUS_TEXT, StatusCode } from '@std/http';
|
||||
|
||||
import config from '~config';
|
||||
|
||||
Deno.serve({ port: config.api.port }, async (req) => {
|
||||
if (req.method === 'GET') {
|
||||
// handle all gets
|
||||
} else {
|
||||
// handle auth then all other shiz
|
||||
}
|
||||
|
||||
return new Response(STATUS_TEXT[STATUS_CODE.NotImplemented]);
|
||||
});
|
||||
Reference in New Issue
Block a user