Hi Jonathan,
You could have a look at the DBA code (but it might require some
preknowledge on how RESTXQ works) [1]. We decided to keep the DBA code
pretty lean (it uses basic HTML and a few lines of JavaScript code).
If you are planning to create a full web application, you may want to
choose a client framework that suits you best (XForms; or Angular,
Vue, React, …). Do you have any preferences?
Best,
Christian
[1] https://docs.basex.org/wiki/DBA
> Is there a sample project that works with the current BaseX? I am basically looking for an example to use to help me get started with my own project, and I want to use whatever the current approach is.
>
> Jonathan
>
> On Fri, Oct 22, 2021 at 4:10 PM Christian Grün <christian.gruen@gmail.com> wrote:
>>
>> Hi Jonathan,
>>
>> The blog example seems to be based on BaseX 7 [1] (which was still
>> based on Jetty 8), so you may need to run it with an older version of
>> BaseX.
>>
>> Best,
>> Christian
>>
>> [1] https://github.com/siserle/blog-example/blob/master/pom.xml#L89
>>
>>
>> On Fri, Oct 22, 2021 at 7:54 PM Jonathan Robie <jonathan.robie@gmail.com> wrote:
>> >
>> > $ git clone https://github.com/siserle/blog-example
>> > $ basexhttp
>> >
>> > /Users/.../blog-example/.basex: Unknown option 'GLOBALLOCK'.
>> > /Users/.../blog-example/.basex: Unknown option 'EVENTPORT'.
>> > /Users/.../blog-example/.basex: writing new configuration file.
>> > [main] INFO org.eclipse.jetty.util.log - Logging initialized @992ms to org.eclipse.jetty.util.log.Slf4jLog
>> > [main] WARN org.eclipse.jetty.xml.XmlConfiguration - Config error at <Call name="addConnector"><Arg>
>> > <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"><Set name="host"><SystemProperty name="org.basex.serverhost" default="0.0.0.0"/></Set><Set name="port"><SystemProperty name="org.basex.serverport" default="8984"/></Set><Set name="maxIdleTime">60000</Set><Set name="reuseAddress">false</Set><Set name="Acceptors">2</Set></New>
>> > </Arg></Call>
>> > org.eclipse.jetty.server.nio.SelectChannelConnector
>> >
>> > That resulted in rewriting the .basex config file:
>> >
>> > $ git diff .basex
>> >
>> > diff --git a/.basex b/.basex
>> >
>> > index f5d8f6b..872cefa 100644
>> >
>> > --- a/.basex
>> >
>> > +++ b/.basex
>> >
>> > @@ -1,24 +1,25 @@
>> >
>> > -# BaseX Property File.
>> >
>> > -
>> >
>> > # General Options
>> >
>> > +DEBUG = false
>> >
>> > DBPATH = data
>> >
>> > +LOGPATH = .logs
>> >
>> > REPOPATH = repo
>> >
>> > -DEBUG = false
>> >
>> > LANG = English
>> >
>> > LANGKEYS = false
>> >
>> > -GLOBALLOCK = false
>> >
>> > +FAIRLOCK = false
>> >
>> > +CACHETIMEOUT = 3600
>> >
>> >
>> >
>> > # Client/Server Architecture
>> >
>> > HOST = localhost
>> >
>> > PORT = 1984
>> >
>> > SERVERPORT = 1984
>> >
>> > -EVENTPORT = 1985
>> >
>> > USER =
>> >
>> > PASSWORD =
>> >
>> > SERVERHOST =
>> >
>> > PROXYHOST =
>> >
>> > PROXYPORT = 80
>> >
>> > NONPROXYHOSTS =
>> >
>> > +IGNORECERT = false
>> >
>> > +IGNOREHOSTNAME = false
>> >
>> > TIMEOUT = 30
>> >
>> > KEEPALIVE = 600
>> >
>> > PARALLEL = 8
>> >
>> > @@ -27,9 +28,12 @@ LOGMSGMAXLEN = 1000
>> >
>> >
>> >
>> > # HTTP Services
>> >
>> > WEBPATH = .
>> >
>> > +RESTPATH =
>> >
>> > RESTXQPATH = restxq
>> >
>> > +PARSERESTXQ = 3
>> >
>> > HTTPLOCAL = false
>> >
>> > STOPPORT = 8985
>> >
>> > +AUTHMETHOD = Basic
>> >
>> >
>> > If I try again, there are no rewrites, but it still does not start:
>> >
>> > $ basexhttp
>> >
>> > [main] INFO org.eclipse.jetty.util.log - Logging initialized @303ms to org.eclipse.jetty.util.log.Slf4jLog
>> >
>> > [main] WARN org.eclipse.jetty.xml.XmlConfiguration - Config error at <Call name="addConnector"><Arg>
>> >
>> > <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"><Set name="host"><SystemProperty name="org.basex.serverhost" default="0.0.0.0"/></Set><Set name="port"><SystemProperty name="org.basex.serverport" default="8984"/></Set><Set name="maxIdleTime">60000</Set><Set name="reuseAddress">false</Set><Set name="Acceptors">2</Set></New>
>> >
>> > </Arg></Call>
>> >
>> > org.eclipse.jetty.server.nio.SelectChannelConnector
>> >
>> >
>> > Any clues?
>> >
>> > Thanks!
>> >
>> > Jonathan