# allows calls from REST API tools like Postman
npm run dev # endpoints are at http://localhost:8000/api/
# Private API; only accessible from whitelisted origins
GET /api/gh_repo?owner=REPO_OWNER&repo=REPO_NAME
# Public API; anybody can call
GET /api/wakatime_code_stats
- In order to access
gh_repo
api, make a new GitHub Private Access Token with appropriate scope and add the token in environment variables asGH_PAT
. Also add the allowed origin to access this end-point asNEXT_PUBLIC_GH_REPO_ALLOW_ORIGIN
. - In order to access
wakatime_code_stats
api, make a new WakaTime API Key and add the key in environment variables asWAKATIME_API_KEY
.