mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 12:57:46 +00:00
18 lines
367 B
JavaScript
18 lines
367 B
JavaScript
import isLeapYear from 'leap-year';
|
|
|
|
export const config = {
|
|
runtime: 'edge'
|
|
};
|
|
|
|
export default async function handler(req) {
|
|
const data = { isLeapYear: isLeapYear() };
|
|
const json = JSON.stringify(data);
|
|
|
|
return new Response(json, {
|
|
headers: {
|
|
'content-type': 'application/json;charset=UTF-8',
|
|
'access-control-allow-origin': '*'
|
|
}
|
|
});
|
|
}
|