Set up my-local-aTbRef - HowTo?

As a learning exercise and also to keep internet traffic in hand I have (tried) to setup a local version of aTbRef as so nicely outlined by @mwra here.

Everything works as expected, so many thanks & cudo’s for that!
But…

A question remains:
How do we get the (local) search to work? Is this even possible? Or do we need more, thinking of a proper Apache or Nginx webserver? I remember that macOS used to come with Apache if I’m not mistaken.
There’s more info on the changes here.

Thanks for helping out!

The code for the search in /js/fuse-search-min-plain.js expects to be online, so if you need search I guess you want to run a local server (i.e. localhost://). The latter is not my area of expertise but I’m sure someone else here will know.

FWIW, I had to adapt some minified JS code to get this all working so I’ve no idea how the whole thing works. I’m just happy someone kindly shared the code.

Thanks for replying Mark.
Not sure, but is this what you are referring to re: minified JS code?

I already assumed this needs a “real” webserver and not just html stored in a folder. I’ll have a look if I can get it to work on my Unraid server. Will update here if I can get it to work.

No, it is the JavaScript file used by the aTbRef’s search page: see Fuzzy Search for aTbRef.

The issue is the index info is loaded via an AJAX call and that doesn’t wok in a local ‘static’ file but will on a web server (or such is my limited understanding). That aside, all the content is local. IOW, if you run local web server, you can run aTbRef even if not connected to the Web. Actually, the following features won’t work unless toggled out:

  • Web search: DuckDuckGo and Google. I really ought to drop these as I don’t think they’ve ever really worked effectively—as in the matches being valid.
  • The aTbRef donation link (as it run via PayPal). (Not sure I built a local-export toggle for this.)
  • The Google-supplied page translation. I’ve head it’s not great mainly as such tools don’t cope well with technical literature unless something is in a big corpus, e.g. coding Python vs. Action code!
  • The Creative Commons link

But, for local (off-Web) use, I think you aren’t actually likely to click any of those.

So solutions are:

  • run a local webserver. This is not complex as such, I just don’t recall the right magic incantation to make it happen.
  • re-write the JavaScript code loading the index. Likely not a novice task, so the above seems the easiest apprach.