silphius/app/routes/resources.stream/route.jsx
2024-09-21 06:24:26 -05:00

9 lines
304 B
JavaScript

import {encodeResources, loadResources} from '@/util/resources.server.js';
export async function action({request}) {
const paths = await request.json();
const assets = await loadResources();
const buffer = await encodeResources(paths.map((path) => assets[path]));
return new Response(buffer);
}