Can Roxy be used to deploy generic MarkLogic applications?

218 Views Asked by At

I have developed a MarkLogic application which is neither an MVC nor a REST application (more precisely, it is a REST API which doesn't use the standard ML REST API).

I'd like to use Roxy to package and deploy this application but Roxy includes either ML's REST API or MVC framework when you create a new project.

Is it possible to strip down what is deployed by Roxy or do I have to find other solutions such as MarkLogic packaging which is much less features complete than Roxy?

3

There are 3 best solutions below

3
On BEST ANSWER

To use the Deployer for a non-MarkLogic REST API application, I would start with an mvc application (ml new my-app --app-type=mvc), remove the provided source code (rm -rf src), then reset the URL rewriter and error handler

  • url-rewriter=
  • error-handler=

Then you can copy your code into src.

-- Update --

As grtjn has noted, this ticket was implemented in Roxy. Correct answer is now to use --app-type=bare.

0
On

As suggested in the comments on Dave's answer, a new Roxy app type has been introduced. You can now use:

ml new my-app --app-type=bare

That give amongst others an empty src folder, no rest-api, and no rewriter..

HTH!

2
On

If you create a new Roxy project using the REST-type, you will notice that the src folder is empty, and the rest-api folder won't contain much either. If you are willing to ignore the rest-api folder, and rework a few settings in build.properties to match your own rewriter and such, then there is not much holding you back to deploy most kinds of MarkLogic applications.

You can also use deploy src instead of deploy modules to make it skip the deployment or the REST options and extensions.

HTH!