Movie Masher is available as source code, a set of bundle modules, or as a prebuilt server image, so there are many ways to integrate it into a given project. Which is chosen can depend on developer preference or familiarity with the tooling. Different mechanisms may even be utilized as a project is developed and deployed in different environments.
Since the online demos only include the client-side components of the system, the first step is typically to launch a fully functional one either locally or in the cloud to test out the rendering features.
Non-developers or anyone with an Amazon account may find launching Movie Masher within their AWS Marketplace to be the simplest option. The image available there can be used to launch an EC2 instance of any size, to which you have full access. You can even make your own images based on it, including any custom changes or additions.
Developers familar with Docker may instead want to launch the image available on DockerHub, either locally or within a cloud-based container service. This option provides the same ability to access the instance and build atop the image.
Other developers and those ready to start integrating will want to clone the repository from GitHub to their local machine. Learn more about installing dependencies, building the example deployment, and starting the demo in the README.
The interface between client and server is highly structured, with both requests and responses consisting of strongly typed JSON objects that effectively constitute the API betwen them. Communication is funneled through the ApiClient component on the client and the ApiServer class on the server.
To create these instances in the example deployment, both the client and server utilize functions that provide them with default configuration. In the case of the client this function is DefaultMasherProps which returns a MasherProps object, while the server calls DefaultHostOptions which returns a HostOptions object.
The server creates a Host instance from its configuration and calls its
start method to create the ExpressJs instance that utimately creates the ApiServer. The client creates a Masher component instance from its configuration which will, by default, be wrapped in an ApiClient component instance.