Instructions to build with an IDE is described here.
- Ensure you have
Java 8
installed - Open terminal or command line and navigate to the
flood
directory - Run
./gradlew bootJar
(it is not necessary to have Gradle installed in your system) - You will get an output similar to below
Starting a Gradle Daemon (subsequent builds will be faster) BUILD SUCCESSFUL in 6s 3 actionable tasks: 3 up-to-date
- Run
java -jar build/libs/flood-0.0.1-SNAPSHOT.jar --node.port=44444 --server.port=8080
- If the node starts correctly you will see log messages like below
2018-10-19 16:29:11.787 INFO 15771 --- [ main] com.dsvl.flood.FloodApplication : Started FloodApplication in 3.403 seconds (JVM running for 3.948) 2018-10-19 16:29:11.789 INFO 15771 --- [ main] com.dsvl.flood.Registrant : Attempting to register with the bootstrap server 2018-10-19 16:29:11.794 INFO 15771 --- [ main] com.dsvl.flood.UdpHelper : Sent UDP message to 127.0.0.1:55555 0029 REG 127.0.0.1 44445 dsvl 2018-10-19 16:29:11.796 INFO 15771 --- [ main] com.dsvl.flood.UdpHelper : Received UDP message from 127.0.0.1:55555 0044 REGOK 2 127.0.0.1 45555 127.0.0.1 44444 2018-10-19 16:29:11.796 INFO 15771 --- [ main] c.d.f.service.impl.RegisterServiceImpl : Successfully registered with the bootstrap server
- If you want to start multiple node instance, run the same command with different
node.port
andserver.port
values