mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-08-24 06:47:11 +00:00
Documentation website
This commit is contained in:
13
website/data/github.js
Normal file
13
website/data/github.js
Normal file
@ -0,0 +1,13 @@
|
||||
const { default: fetch } = require("node-fetch")
|
||||
|
||||
module.exports = async function() {
|
||||
try {
|
||||
const res = await fetch('https://api.github.com/repos/garraflavatra/alphabets');
|
||||
const json = await res.json();
|
||||
return { stars: json.stargazers_count || 0 };
|
||||
}
|
||||
catch (error) {
|
||||
console.error('ERROR | Could not fetch GitHub stars:', error);
|
||||
return { stars: 0 };
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user