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 
 https://docs.basex.org/wiki/Options#HTTP_Services and https://docs.basex.org/wiki/Web_Application#Services 

 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