Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.19 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.19 KB

NatsServerRunner

Run the NATS messaging system server.

Useful for running unit or integration tests on the localhost.

The server must be in your path under the name nats-server or you must set the NATS_SERVER_PATH environment variable to point to it

NatsServerRunner(1234).use{
    println("Server running on port: " + it.uri)
    val c = Nats.connect(it.uri)
    ...
}

Inspired by java-nats-server-runner, but corrected and simplified

Import project using jitpack

  1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:
    repositories {
     mavenCentral()
     maven(url = "https://jitpack.io")
    }
  2. Add the dependency
    dependencies {
      testImplementation("com.github.redbadger:nats-server-runner:1.0.0")
    }

Contributing

The project is deployed using JitPack

License

NatsServerRunner is available under the MIT license. See the LICENSE file for more info.