Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Port already bound Error #56

Closed
wants to merge 13 commits into from
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,31 @@ Once you are inside the project directory, run the application:
$ sbt run
```

## Running the Application with sbt-revolver

To manage the quickstarts application lifecycle more effectively and avoid issues like the `Port already bound` error when restarting the server, we have integrated the `sbt-revolver plugin`. This plugin allows you to start, stop and monitor easily using the following commands:

1. To start the application in a forked JVM, use the `reStart` command:

```bash
$ sbt reStart
```
This will start quickstart application, and if it's already running, it will first stop the previous instance before restarting.

2. To stop the running application, use the `reStop` command:

```bash
$ sbt reStop
```
This command will force-kill the forked JVM running your application. Note that any shutdown hooks (e.g., graceful shutdown logic) will not be executed when using this command.

3. To check the current running state of application, use the `reStatus` command:

```bash
$ sbt reStatus
```
This will provide you with a log message about whether the application is currently running or stopped.

## List of Quickstarts

- [ZIO Cache](zio-quickstart-cache)
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")

addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")

addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0")

resolvers ++= Resolver.sonatypeOssRepos("public")
Loading