mirror of
https://github.com/Lissy93/web-check.git
synced 2025-08-14 06:48:38 +02:00
Convert all API endpoints into ESM modules
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
const https = require('https');
|
||||
const middleware = require('./_common/middleware');
|
||||
import https from 'https';
|
||||
import middleware from './_common/middleware.js';
|
||||
|
||||
const handler = async (url) => {
|
||||
const carbonHandler = async (url) => {
|
||||
|
||||
// First, get the size of the website's HTML
|
||||
const getHtmlSize = (url) => new Promise((resolve, reject) => {
|
||||
@ -48,5 +48,5 @@ const handler = async (url) => {
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = middleware(handler);
|
||||
module.exports.handler = middleware(handler);
|
||||
export const handler = middleware(carbonHandler);
|
||||
export default handler;
|
||||
|
Reference in New Issue
Block a user