@cnocon/github-stats-card
v0.2.0
Published
A stats card for GitHub metrics.
Downloads
8
Maintainers
Readme
GitHub Stats Card
Pass in a minimum of your GitHub access token and a GitHub username and get this:
Installation
npm install @cnocon/github-stats-card
Example using Express:
The Card function returns an HTML string you can append anywhere. The first argument is the GitHub username, the second is your GitHub access token, and the third is an optional Boolean
for whether or not you want to style the card with the included theme. Defaults to false
.
const { Card } = require('@cnocon/github-stats-card');
// ...
app.get('/', async (req, res) => {
const statsCard = await Card('cnocon', process.env.GITHUB_ACCESS_TOKEN, true);
res.send(statsCard);
});