🚑 vix vercel endpoint

This commit is contained in:
platane
2023-10-06 10:38:48 +02:00
parent b58af55b7d
commit 01fa6d7aac
3 changed files with 54 additions and 13 deletions

View File

@@ -1,5 +1,8 @@
import { getGithubUserContribution } from "@snk/github-user-contribution";
import { VercelRequest, VercelResponse } from "@vercel/node";
import nodeFetch from "node-fetch";
(global as any).fetch = nodeFetch;
export default async (req: VercelRequest, res: VercelResponse) => {
const { userName } = req.query;

View File

@@ -2,7 +2,11 @@
"name": "@snk/github-user-contribution-service",
"version": "1.0.0",
"dependencies": {
"node-fetch": "2.7.0",
"@snk/github-user-contribution": "1.0.0",
"@vercel/node": "3.0.6"
},
"devDependencies": {
"@types/node-fetch": "2.6.6"
}
}