5. Set up sample app

Updated 2 months ago by Rahul Lahiri

We provide a sample app, MovieInfo, and a sandbox to get you going with API Studio. This includes:

  • Code for one service, movieinfo, to run in your IDE
  • Live services for other services the movieinfo service depends on running in the Mesh Dynamics cloud
  • Mocks for the above services

Sample App: MovieInfo

When you download and install API Studio, we create the trial app, MovieInfo, in your account. We will use the example requests and mocks included with this app to get familiar with the capabilities of the tool.

Note: there is only one instance of the test app shared with all users in your organization. Example traces for the test app are provided with API Studio. The 'golden' containing the example API traces cannot be modified, and the provided API requests can be used by everybody. Any modifications made by users are saved to collections.

Download movieinfo Service Code

We provide example code for a Java service that you can download for a quick start using the tool. The test service works with the mocks provided for the test app. To download and setup the movieinfo service code, follow the steps below.

  1. The sample_apps MovieInfo repository is on github. Clone the customer_release branch:
    git clone --single-branch --branch customer_release https://github.com/cube-io-corp/sample_apps.git
  2. Import sample_apps as a Maven project in your favorite IDE. This should import multiple modules in your workspace. MIRest is the module of interest, and it depends on Utils module. Do an mvn clean install of the Utils module.
  3. Next, do an mvn clean install of the MIRest project. This should create a MIRest-V1-SNAPSHOT.war in the target folder.
  4. You should have tomcat server as part of the IDE. Start the tomcat server running the MIRest project.
  • In Eclipse IDE, right-click on the MIRest project and Run on Server. This should allow you to configure the Tomcat server and the application should start running.
  • If you are using Intellij Idea, click on MIRest project and select Run > Run … from the menu. This will bring up the “Run configuration” screen. Create a new run configuration for “Tomcat Server”. In the deployment tab, check that the MIRest:war is listed and change the Application context from “/MIRest_war” to /MIRest”. The server url will show up on the server tab as “http://localhost:8080/MIRest".

Next steps

Next, set up the request routing configurations in the API Studio for the sample service.

How did we do?