Server /api returning 404, but still working
I have a server route in
/server/api/download.post.ts
. When fetching it, the route seems to return a 404 Cannot find any route matching /api/download.
However, this makes no sense as the route works fine and the code inside the route actually works - just when it finishes (it's non-sync code I believe, tried promisify-ing it to no luck) the event.node.res.end
won't work. Any help?4 Replies
Am I understanding correctly that you tried wrapping the ffmpg in a function that returns a promise and is then awaited? Or what did you do to make it be handled in an async context
Was thinking something like this perhaps:
@Tony
Oh hell yeah, that worked great, thanks a bunch!
I didn't realise that the ffmpeg library is pretty old and not promise/sync by default
I'm only running into an issue with fs.unlink hanging now, otherwise working great. Thanks!
ah nice, you're welcome! 👌