Git Product home page Git Product logo

kara's Introduction

KARA

Kara, another request analyzer

an HTTP bin in Java

Test it out at https://kara.rest

I made this for me an my colleagues, tailored to our needs.

Features

  • Websocket interface
  • Custom response bodies
  • REST api for retrieving bins, results or parts thereof (See the openApi definition)
  • MQTT support
  • docker container available at https://hub.docker.com/r/yunzlez/kara/

Stuff I wanna do at some point

  • Replace thymeleaf interface with React, or something
  • Support custom headers & cookies in the response
  • Support simple template responses (Some work already done, such as an ANTLR4 grammar)
  • Statistics (With fancy graphs)
  • Scriptable responses
  • Externalize configuration
  • Support for something else than MySQL

How to run

You need:

  • Java 11
  • MySQL 8

You do:

  • mvn package
  • just java -jar kara-bin-1.3.0.jar, although setting an XMX is a good idea. I found 128M to be a good value. I use:java -Xmx128M -XX:+UseG1GC -XX:+UseStringDeduplication -XX:-TieredCompilation -jar kara-bin-1.3.0.jar -Dspring.profiles.active=remote

You can pass the following options using -D :

  • spring.datasource.url -> JDBC connections string. Use 'kara' as the schema, other names are not yet supported
  • spring.datasource.username -> DB username
  • spring.datasource.password -> DB Pass
  • server.use-forward-headers -> true if running behind proxy (default). Kara needs this to detect the base URL.
  • mqtt.broker.url -> broker to use if MQTT is enabled
  • mqtt.enabled -> enable MQTT
  • mqtt.clientid -> ClientId to use for publishing
  • logging.level.be.zlz.kara -> The logging level

You can also run using -Dspring.profiles.active=docker, which allows you to use environment variables for some of these settings:

  • DATABASE_URI -> The database URI (not a jdbc string, just the host)
  • DATABASE_USR -> DB user
  • DATABASE_PWD -> DB password
  • MQTT_ENDPOINT -> The MQTT broker uri
  • MQTT_ENABLED -> Whether to enable MQTT (default true)

Obviously, you can mix these up with the previous set of settings.

kara's People

Contributors

elapo avatar yunzlez avatar shenno avatar dependabot[bot] avatar

Stargazers

Brent avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.