moclojer
GitHub
  • moclojer
  • Creating mock server
  • Moclojer Configuration Specification
  • Using rendering templates
  • External body
  • Multi-domain support
  • Rate Limiting
  • Run it mocker server
  • Webhook support (background request)
  • WebSocket support
  • Using moclojer as a framework
  • 📑Releases
    • next
    • v0.4.0
    • v0.3.5
    • v0.3.4
    • v0.3.3.1
    • v0.3.3
    • v0.3.2
    • v0.3.1
    • v0.3.0
    • v0.2
    • v0.1
Powered by GitBook
On this page
  • Environment vars
  • Clojure
  • Binary
  • jar file
  • Docker

Was this helpful?

Edit on GitHub

Run it mocker server

moclojer is written in the Clojure programming language and is provided for distribution in some formats.

PreviousRate LimitingNextWebhook support (background request)

Last updated 8 months ago

Was this helpful?

Environment vars

  • XDG_CONFIG_HOME: to fetch the default moclojer configuration file (default: $HOME/.config)

  • MOCLOJER_ENV: define the environment where the moclojer is running, we accept prod or dev (default: prod)

Clojure

Has an alias created in edn with the name “run”

CONFIG=moclojer.yml clojure -X:run

moclojer uses XDG_CONFIG_HOME to fetch the default moclojer configuration file, if you want to set a different directory you must use the -c or CONFIG environment variable

Binary

You don’t have the binary file yet? . The moclojer is distributed as follows:

  • Binary format: moclojer_<OS> - in binary format (you don’t need anything additional on your operating system to run it)

    • Linux moclojer_Linux

    • macOS moclojer_macOS

  • moclojer.jar - _in java format (you need to install java to run it)

  • Docker image - _in docker format (you need to install docker to run it)

After creating the file you must run moclojer passing the configuration file by the CONFIG environment variable:

CONFIG=moclojer.yml moclojer # binary filename

jar file

CONFIG=moclojer.yml java -jar moclojer.jar

Docker

docker pull ghcr.io/moclojer/moclojer:latest
docker run -it \
  -p 8000:8000 -v $(pwd)/moclojer.yml:/app/moclojer.yml \
  ghcr.io/moclojer/moclojer:latest

to use the edn format, you must pass the following parameters to docker:

-e CONFIG=moclojer.edn -v $(pwd)/moclojer.edn:/app/moclojer.edn

Download it here