Running a Mock Service in the Mendix Cloud along with my application

0
Hello all, I went through the crash course and built the MockHrService project to act as a REST service endpoint.  I am able to run it locally in a separate instance of Studio Pro.  It works great for developing my client application as MockHrService makes for a great substitute until my real service implementation is ready.  However, I would like to have the mock service available to other team members when I deploy the client application to my testing environment on the Mendix cloud. Is there a way to deploy the mock service along with the client application into the Mendix cloud environment?
asked
1 answers
0

So your client-application consumes REST-services that are soon to be published by application ‘HrService’. But for now, the published REST-services of HrService are only available in your ‘MockHrService’ local.

To make your mock-services available, you have two options:

  1. If HrService is currently being built and has cloud-environments like test and acceptance: Add the MockHrService to your HrService and deploy your HrService to any cloud environment
  2. If you have no other cloud environments available other then for your client application: Add MockHrService as a module to your client application and in your client application set the endpoint to itself, calling the mockservice that will be on the same url that your client-application is.

Both have their pro’s and con’s, but both do the job very well.

It is also not a bad idea to have your company provide for a mock-server, that is just there for providing mock-services for any project. And then you can add your MockHrService to that one.

answered