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/
Some notes on search libraries for dropserver after spending a few minutes looking into it:
- lunr.js was the old go-to but seems no longer supported. Was awkward to use in Deno especially in TS file.
- Stork looks intriguing: https://stork-search.net/ but have not tried. WASM indicates should run fine. Currently being worked on.
- I'd also try loading the content into a sqlite DB and use the FTS5 module. Big advantage is not needing to load entire index in memory to search (I think?)
3/3
Oh there is also fuse.js for which there is a Deno package already:
https://deno.land/x/fuse@v6.4.1