Thanks Michael,

I cloned your repo and borrowed your .basex file.  It did indeed allow me to specify the page location.  However, I'm not able to get it to find my RESTXQ is my services.  I added the out of the box BaseX ./bin to my PATH and changed to a completely different directory.  Attached is my .basex and database-services.xqm file.  For debugging purposes, I wanted to make sure my services point to the right database.  My setup is like this: 

PROJECT_ROOT/.basex
PROJECT_ROOT/.basexhome
PROJECT_ROOT/modules/database
PROJECT_ROOT/webapp/modules/database-services.xqm
PROJECT_ROOT/modules/database-services.xqm

I duplicated the database-services file because I wasn't sure what folder the RESTXQ was relative to. 

Vielen Danke!

Best Regards,
Ben Pracht
919.809.2439
ben.pracht@gmail.com


On Fri, Jul 3, 2020 at 5:13 PM Michael Seiferle <ms@basex.org> wrote:
Hi Ben,

Glad you enjoy setting up a restxq project, we use it as a primary driver of our Web-applications 👍

I set up a small project (in response to a related question last week), that serves static content from /webapp at „http://localhost/“ and maps all restxq endpoints to http://localhost/api

=> https://git.basex.io/basex-public/mailinglist-autocomplete
This might be a good start for you future endeavors :-)

The relevant settings are found in „.basex“ (This file defines where on disk to look for static and restxq files) and „ webappWEB-INFweb.xml“ (defines at what path static files and restxq endpoints are served by the Webserver).

These  options are explained here 

 You should be fine using ant 🐜 

Feel free to ask for more information :-)

Best
Michael



Von meinem iPhone gesendet

Am 03.07.2020 um 09:19 schrieb Ben Pracht <ben.pracht@gmail.com>:


Hi,
I'd like to serve static content in the same server as the one handling the restxq.  However, I noticed it expects the content to be in some level under the static directory. Then, the URL also needs the static directory. 

Is it possible to change both the directory the static files live and the URL?  That way I can create a site without requiring the end user to append static to the URL to get to index.html.

Ultimately, I want to create static pages, restxq services, schemas and a database, but have them isolated from the BaseX distribution.  I've seen some flags to specify some directory locations, but not the static one.

I'm using Ant so I can take the source distribution, copy that to a target directory, and in another step, copy my source files.  I realize Ant is old, but I have no idea how to do this in Maven.

By the way, I absolutely love how easy it is to do a site yet it actually seems quite powerful.

Kind Regards,
Ben