mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
16 lines
423 B
TypeScript
16 lines
423 B
TypeScript
import { server } from "~index";
|
|
|
|
/**
|
|
* This allows us to send a test request to the server even when it isnt running
|
|
* CURRENTLY NOT WORKING, NEEDS TO BE FIXED
|
|
* @param req Request to send
|
|
* @returns Response from the server
|
|
*/
|
|
export async function sendTestRequest(req: Request) {
|
|
return server.fetch(req);
|
|
}
|
|
|
|
export function wrapRelativeUrl(url: string, base_url: string) {
|
|
return new URL(url, base_url);
|
|
}
|