• Stars
    star
    37
  • Rank 720,807 (Top 15 %)
  • Language
    Clojure
  • Created almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple and efficient HTTP mock server with specification in yaml, edn or OpenAPI

moclojer

moclojer

Simple and efficient HTTP mock server with specification written in yaml, edn or OpenAPI.

💾 Download the binary with the latest version of moclojer to test on your computer here.

tests linter

📖 See the complete documentation for moclojer here, if you want to contribute (or complement) the documentation, it is here.

YAML example

# This mock register route: GET /hello/:username
- endpoint:
    # Note: the method could be omitted because GET is the default
    method: GET
    path: /hello/:username
    response:
      # Note: the status could be omitted because 200 is the default
      status: 200
      headers:
        Content-Type: application/json
      # Note: the body will receive the value passed in the url using the
      # :username placeholder
      body: >
        {
          "hello": "{{path-params.username}}!"
        }

docker

  • image: ghcr.io/moclojer/moclojer:dev
  • port (default): 8000, if you want to change the port set the environment variable PORT
docker run -it \
  -p 8000:8000 -v $(pwd)/moclojer.yml:/app/moclojer.yml \
  ghcr.io/moclojer/moclojer:dev

we Two available versions:

  • dev: main branch docker image
  • latest: latest stable version image

manual (Linux & macOS)

bash < <(curl -s https://raw.githubusercontent.com/moclojer/moclojer/main/install.sh)

If you are using Linux you maybe need sudo.

CLI Usage

  • clj -M:run [OPTIONS]
  • java -jar moclojer.jar [OPTIONS]
  • moclojer_Linux [OPTIONS]

Options

-c, --config

Config path or the CONFIG environment variable. [default: ~/.config/moclojer.yml]

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

-m, --mocks

OpenAPI v3 mocks path or the MOCKS environment variable.

-h, --help

Show help information

-v, --version

Show version information

💻 dev environment

We use git submodule to integrate with OpenAPI v3 specification, if you want to use it, you will need to update the git submodule code.

git submodule update -f --init

run

clj -M:run

test

clj -M:test

moclojer.jar generate

clj -A:dev -M --report stderr -m moclojer.build

More Repositories

1

awesome-go

A curated list of awesome Go frameworks, libraries and software
Go
129,923
star
2

awesome-racket

A curated list of awesome Racket frameworks, libraries and software, maintained by Community
Racket
444
star
3

liquidluck

Felix Felicis (aka liquidluck) is a static blog generator in python
Python
335
star
4

nacho

Python micro web-framework and asynchronous networking library tulip, support Python >= 3.3
Python
102
star
5

pycorreios

API correios.com.br in Python
Python
62
star
6

beerblogging

It's a f*&%cking bet! You have 1 month to write at least 1 blogpost. If you don't do that, you have to pay a beer for everybody.
Python
57
star
7

hugo-theme-sarah

Sarah theme for Hugo static site generator
SCSS
52
star
8

quik

A fast and lightweight Python template engine
Python
46
star
9

cover.run

Code coverage
Go
34
star
10

logseq-languagetool

This is a plugin for Logseq to check grammar and spelling using LanguageeTool
Clojure
32
star
11

slugify

A Go slugify application that handles string
Go
32
star
12

bottle-auth

Bootle authentication, for Personal, Google, Twitter and facebook
Python
29
star
13

.vimrc

Distro vim
Vim Script
29
star
14

rdio-linux

Application RDIO for Linux
Python
28
star
15

cookiecutter-bottle

A cookiecutter template for creating reusable Bottle projects quickly.
Python
28
star
16

bottle-admin

Simple and extensible administrative interface framework for Bottle
Python
23
star
17

django-routers

Django multiple databases, auto routers
Python
23
star
18

python-opencv-detect

webcan capiture and face detect
Python
21
star
19

monotropic-theme-vscode

(Almost) monochromatic light theme for VSCode
Clojure
18
star
20

ilix

iLix is an AOSP source built ROM (ie. not a mod of any sense based ROM), it's minimal, it's superfast and mostly bugfree.
14
star
21

gocover.io

Code coverage of any golang package as a service.
Go
12
star
22

avelino

Hey, I'm Avelino! 👋
10
star
23

riak-dashboard

Riak Dashboard is a web-based administrative console for inspecting and manipulating Riak clusters.
JavaScript
9
star
24

bots.clj.social

Feed process and public on mastodon (fediverse clj.social)
Clojure
8
star
25

aur

ArchLinux Package Manager helper
Shell
7
star
26

.emacs

Distro emacs
Emacs Lisp
7
star
27

logseq-summarize

Summarize Plugin for Logseq by tldr.chat
Clojure
7
star
28

django-tags

Simple tag field for django
Python
7
star
29

avelino.run

My personal blog
HTML
7
star
30

seed

Library packaging and distribution for Golang
Go
6
star
31

phanpy-app

A minimalistic opinionated Mastodon mobile client, using phanpy web
C++
6
star
32

dotfiles

personal files
Shell
6
star
33

about.clj.social

about page of clj.social
5
star
34

django-googl

Django short url on goo.gl
Python
5
star
35

cookiecutter-bottle-sample

A cookiecutter sample Bottle projects quickly
Python
5
star
36

hodge

Hodge is a static cms generator in python
Python
5
star
37

cljs-google-datastore

Google Cloud Datastore client to ClojureScript
Clojure
4
star
38

pyBraspag

Processing Braspag sale with Python
Python
3
star
39

twvim

Twitter in vim
Python
3
star
40

ritchie-cli-archpack

Shell
3
star
41

pypagseguro

Biblioteca Python para PagSeguro
Python
3
star
42

dockerfiles

Various Dockerfiles I use on the desktop and on servers
Shell
3
star
43

oss-news

🌐 🗣️ Open Source Weekly
3
star
44

juggler

Juggler application server container
Go
2
star
45

trianguliCET

new project
Python
2
star
46

readertogplusfriends

Google Reader to Google+ Friends
Python
2
star
47

pylocagateway

Processing Locaweb Gateway sale with Python
2
star
48

nexpress

Fast, unopinionated, minimalist web framework for nbb (Clojure on Node.js)
2
star
49

logseq-libs

@logseq/libs wrapper for cljs
Clojure
2
star
50

hyper-monotropic-coffee

A port of the monotropic of coffee color scheme for Hyper.app
JavaScript
2
star
51

estimaai.com

CSS
2
star
52

rsync-backup.sh

Shell
2
star
53

docker-debian

Custom Debian base image for docker
Shell
2
star
54

Flask-Quik

Provides support for Quik Templates in Flask
Python
2
star
55

monstercache

The Monster Cache
1
star
56

post_py_multithreading

Python
1
star
57

post_py_upload_de_arquivo_no_gae

Upload da arquivo no Google App Engine (BlobProperty)
Python
1
star
58

postsbook

Postsbook is a pluggable weblog application for Django Web Framework.
1
star
59

django-cielo

module cielo
1
star
60

joindojo

Join Coding Dojo
1
star
61

caleb-theme

Emacs Theme
Emacs Lisp
1
star
62

defer

Defers the execution of a function until the surrounding function returns
Clojure
1
star
63

lvm-like

Simples LVM Class
Python
1
star
64

dgrid

Grid Deploy
Python
1
star
65

grooveshark-scrobbler

JavaScript
1
star
66

nql

NoSQL with fast storage and cache
1
star
67

iug

Instalador Ubuntu Games
Python
1
star
68

docker-ubuntu

Custom Ubuntu base image for docker
Shell
1
star
69

the5am.club

#the5amclub
CSS
1
star
70

irccloud-chrome

Client IRCCloud for Chrome
JavaScript
1
star
71

django-smart

A smartadmin skin for the Django Admin-Interface.
Python
1
star
72

votacao_paredao_bbb

Python
1
star
73

vcm

Virtual Cluster Manager
JavaScript
1
star
74

monotropic-coffee-hyper

Monotropic Coffee theme for Hyper term
JavaScript
1
star
75

collective.twitter.widget.portlets

Python
1
star
76

dhub

Docker Hub API is a API library written in Go
Go
1
star
77

slides

Slides for talk presetation
1
star
78

paddle

Racket
1
star
79

flux.vim

flux theme for vim
Vim Script
1
star