|
| 1 | +This is an ml-gradle project for deploying a test application to MarkLogic that the tests in ./marklogic-client-api and |
| 2 | +most of the tests in ./marklogic-client-api-functional-tests depends on. |
| 3 | + |
| 4 | +To deploy it, run this from the root directory of this repository: |
| 5 | + |
| 6 | + ./gradlew -i mlDeploy |
| 7 | + |
| 8 | +## Running the reverse proxy |
| 9 | + |
| 10 | +This project also includes a Gradle task for running a reverse proxy server using [Undertow](https://undertow.io/). |
| 11 | +This is intended to support testing the use of a "base path" parameter with the Java Client and to also do a reasonable |
| 12 | +job of emulating how MarkLogic Cloud works. |
| 13 | + |
| 14 | +Note - the reverse proxy server only supports basic authentication, not digest authentication. Thus, you need to ensure |
| 15 | +that any MarkLogic app server that you proxy requests to supports either "digestbasic" or "basic" for authentication. |
| 16 | +That includes your Admin, Manage, and App-Services app servers. |
| 17 | + |
| 18 | +To run the server, run the following: |
| 19 | + |
| 20 | + ./gradlew runBlockingReverseProxyServer |
| 21 | + |
| 22 | +By default, this will listen on port 8020 and proxy requests based on the mapping that it logs when the server is |
| 23 | +started up. |
| 24 | + |
| 25 | +To emulate how MarkLogic Cloud works, run the following (you can use `runBlock` as an abbreviation, Gradle will figure |
| 26 | +out what you mean): |
| 27 | + |
| 28 | + sudo ./gradlew runBlock -PrpsHttpsPort=443 |
| 29 | + |
| 30 | +This will result in the server listening for HTTPS requests on port 443; sudo is required since this listens to a port |
| 31 | +under 1024. |
| 32 | + |
| 33 | +You can also specify custom mappings via the Gradle task. For example, if you have a MarkLogic app server listening on |
| 34 | +port 8123 and you want to associate a path of "/my/custom/server" to it, you can do: |
| 35 | + |
| 36 | + ./gradlew runBlock -PrpsCustomMappings=/my/custom/server,8123 |
0 commit comments