OK I was able to prove to myself that I can write a https://dropserver.org app that returns the results of a search query for a static website in under 50 lines of code (actual "search" done by lunr.js module).
To really demo this I'll create a search backend for my personal site and maybe for dropserver.org as well.
But for that I need to build out a couple features in the Dropserver platform:
- permissions to allow outbound network requests
- auth via JWS or token
1/
Here's how a Dropserver app for searching a static site could work:
- a route behind token auth that Netlify (or whatever builds your site) calls after a new version of site is deployed
- after that route is called, app fetches the content json and generates an index, which gets stored in appspace data dir.
- a public search endpoint that leverages the index to return search results
- private route(s) for the appspace owner where get/set the url of the content json, and last fetch date
2/
Oh there is also fuse.js for which there is a Deno package already: