github-profile-trophy-reiyu.../index.ts
2020-08-23 04:03:09 +09:00

9 lines
383 B
TypeScript

import { ServerRequest } from "./deps.ts";
import { GithubAPIClient } from "./src/github_api_client.ts";
import "https://deno.land/x/dotenv@v0.5.0/load.ts";
const client = new GithubAPIClient();
export default async (req: ServerRequest) => {
const userInfo = await client.requestUserData("ryo-ma")
req.respond({ body: `Hello, from Deno v${Deno.version.deno}!` + userInfo });
};