Skip to content
/ komock Public

KoMock - Simple HTTP/Consul/SpringConfig http server framework written in Kotlin. Wiremock use cases

License

Notifications You must be signed in to change notification settings

laviua/komock

Repository files navigation

Komock Build Status GitHub license

Here is Simple HTTP/Consul/SpringConfig mocker framework written in Kotlin.

This tiny framework is very useful if you need to create REST based client for API service.
We use this framework for develop microservices or API integration with third party systems.

Main features:

  • Configurable response for any kind of HTTP request/response with wildcards, cookies and custom headers.
  • SSL support
  • Virtual Host support
  • Ability to register in the Consul discovery service
  • Ability to work like a simple spring config server

Download latest standalone application

Maven sonatype repository:

<dependency>
    <groupId>ua.com.lavi</groupId>
    <artifactId>komock-core</artifactId>
    <version>RELEASE</version>
</dependency>

Look at self-describable configuration file (sample config exists in the komock-core root project directory): mock_example.yaml

How to run stand alone application:

  1. Extract release version :

     komock-app-x.x.x.zip
    
  2. Run

     bin\komock-app /path/your_config.yaml
    

HTTPS/SSL:

You can use your personal keystore. Just create it by the following command and set filename with password in the configuration file (secure section):

keytool -genkey -alias replserver -keyalg RSA -keystore mock_keystore.jks -dname "CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, S=California, C=US" -storepass mockpassword -keypass mockpassword

ssl:
  enabled: true
  keyStoreLocation: mock_keystore.jks
  keyStorePassword: mockpassword

About

KoMock - Simple HTTP/Consul/SpringConfig http server framework written in Kotlin. Wiremock use cases

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks