import { transpileResponse } from "https://deno.land/x/ts_serve@v1.4.4/utils/transpile_response.ts";
Transpile the body of the response and return a new response.
import { serve } from "https://deno.land/std@0.177.0/http/mod.ts";
import { serveFile } from "https://deno.land/std@0.177.0/http/file_server.ts";
import { transpileResponse } from "https://deno.land/x/ts_serve@v1.4.4/utils/transpile_response.ts"
serve(async (request) => {
const filePath = "./mod.ts";
const response = await serveFile(request, filePath);
return await transpileResponse(response, request.url, filePath);
});
Parameters
response: Response
The response you want to transpile