Sandbox is a platform to quickly and easily create or generate web service mocks, with instant deploy, collaborative build, and debugging tools for API developers. More info - https://getsandbox.com
Sandbox Runtime is the core processing component of the Sandbox product, it is responsible for executing HTTP requests against your definition files (main.js etc) and templates (template.liquid) to produce a response.
This project consists of both the core runtime code, and a lightweight wrapper to simplify command line use. The compiled version is around 10mb and can be run on mac and linux.
Note: Gradle 2.12+ is required to build this yourself, if not using the pre-built binary.
The code can be cloned and compiled by itself (Gradle is used for dependency management) or you can just download the compiled and packaged binary which can be run from the command line on a supported OS.
- Java 8 Update 72 - important! you actually might not have this.
- Mac or Linux
The runtime is Java based, so it will run on any OS that Java 8 supports.
The CLI currently supports one action sandbox run
which will start the runtime with the base directory being the current directory.
Commands:
run Starts a sandbox runtime in the current working directory.
Options:
--port=<port number>
--base=<base directory> (Overrides working directory)
--state=<file to persist state to> (Reads/writes a file to persist state across runs)
--runtimeVersion=VERSION_1|VERSION_2
--verbose (Increases logging verbosity, full request and response bodies etc)
Note for Windows Users: The above commands are for for *nix/mac operating systems that support shell scripts (the binary linked above is basically just a JAR file with a sh wrapper), so Windows users will have to run the standard Java start commands like:
java -jar sandbox --port=8080 run
For a basic example checkout the examples
directory, more detail is available on the Sandbox Getting Started and the API Definition pages.
MIT