sixem / ivfi-node

IVFi is a directory indexer written in Node that aims to make it easy to browse and explore web-accessible directories.
https://git.five.sh/ivfi/
Other
33 stars 3 forks source link

Would this work with Cloudflare Pages, connected to an R2 Bucket? #24

Open cassssperrrr opened 7 months ago

cassssperrrr commented 7 months ago

Is there a way to install IVFi on Cloudflare Pages, then connect my page to my R2?

Please let me know, this project looks amazing ❤

sixem commented 7 months ago

Hi,

Unfortunately, I doubt this is possible. I haven't used Cloudflare Pages or R2 myself, but if my understanding of it is correct, the Cloudflare Pages are just serving static content with the possibility of some additional client-side-only JS?

This project would require it to be ran on the backend in some way, and unless I'm mistaken, I don't see how that would be possible with Cloudflare Pages.

It needs a server to be ran on. What could be possible, is to mount R2 (or any S3-related bucket) on a server (E.g., using S3FS or something similar), then set that mount point to be the root directory of IVFi. This would of course add some additional overhead because it has to go through the API, but I've done something similar in the past, and it has worked for me.

Hopefully that answers your question, and again, I'm not 100% sure about this, but that's my input, at least. If you have any other questions, don't hesitate to ask.