-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Run the site locally
Run the Sagan site application locally, so that it can be browsed at http://localhost:8080.
The Sagan app is built using [Spring Boot][boot], which makes running any application as simple as executing a jar file.
First, assemble the JAR file for the site:
$ ./gradlew :sagan-site:build -x check
Note: the
-x check
argument above skips running tests in the interest of time.
Then run the app with java -jar
:
$ java -jar sagan-site/build/libs/sagan-site.jar
A few seconds later you'll see a log entry to the effect of
sagan.SiteMain : Started SiteMain in 8.455 seconds
And that means you can now browse the site at http://localhost:8080. Enjoy!
While it's important to understand the simple process of building and executing a jar as detailed above, an even more convenient approach is to use the run
Gradle task:
$ ./gradlew :sagan-site:run
Assuming that you have followed the instructions to use an IDE, you can easily run the application by opening the sagan.SiteMain
class and executing it's main()
method.