I am confused about what is required for running a web app.  Here's what I have tried so far:

1. Running basexhttp from ./Downloads/basex

If I download the .zip file from https://basex.org/download/ and run basexhttp from the /Downloads/basex subdirectory, I can see the "BaseX HTTP Services" page at localhost:8984, but when I look at localhost:8984/rest, I see no databases:

<rest:databases resources="0"/>

2. Running basexhttp from a random directory

If I run basexhttp from a random or empty directory, localhost:8984 returns this message:
Service not found.
But localhost:8984/rest lists all of my databases.

3. Running basexhttp using a copy of ./Downloads/basex/webapp

I created a ./basex directory in a temporary directory and did this:

cp -r /Users/xxx/Downloads/basex/webapp .


I then tried running basexhttp from the new ./basex directory I created in the temporary directory.  The results were the same as running from a random directory.  

Running from within the webapp directory does not work in either case.

What am I doing wrong?

Thanks!

Jonathan