mirror of
https://github.com/Lissy93/web-check.git
synced 2025-08-09 05:04:31 +02:00
Updates all API functions, to work on both Vercel & Netlify
This commit is contained in:
@ -2,7 +2,7 @@ const traceroute = require('traceroute');
|
||||
const url = require('url');
|
||||
const middleware = require('./_common/middleware');
|
||||
|
||||
const executeTraceroute = async (urlString, context) => {
|
||||
const handler = async (urlString, context) => {
|
||||
// Parse the URL and get the hostname
|
||||
const urlObject = url.parse(urlString);
|
||||
const host = urlObject.hostname;
|
||||
@ -28,4 +28,5 @@ const executeTraceroute = async (urlString, context) => {
|
||||
};
|
||||
};
|
||||
|
||||
exports.handler = middleware(executeTraceroute);
|
||||
module.exports = middleware(handler);
|
||||
module.exports.handler = middleware(handler);
|
||||
|
Reference in New Issue
Block a user