GithubHelp home page GithubHelp logo

sjtower / example-ratpack-gradle-kotlin-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ratpack/example-ratpack-gradle-kotlin-app

0.0 0.0 0.0 248 KB

An example of a Kotlin Ratpack app built with Gradle.

Kotlin 100.00%

example-ratpack-gradle-kotlin-app's Introduction

This is an example Ratpack app that:

  1. Is implemented in Kotlin
  2. Use Guice for dependency injection
  3. Uses the ratpack Gradle plugin
  4. Uses SpringSource's SpringLoaded for runtime reloading of classes during development
  5. Adds helper functions to make Ratpack more Kotlin like (see helpers.kt)

Getting Started

Check this project out, cd into the directory and run:

./gradlew run

This will start the ratpack app in a development mode. In your browser go to http://localhost:5050.

The Gradle Ratpack plugin builds on the Gradle Application plugin. This means it's easy to create a standalone distribution for your app.

Run:

./gradlew installApp
cd build/install/example-ratpack-gradle-java-app
bin/example-ratpack-gradle-java-app

Your app should now be running (see http://gradle.org/docs/current/userguide/application_plugin.html) for more on what the Gradle application plugin can do for you.

Development time reloading

Most application classes can be changed at runtime without needing to restart the application. This is made possible by Gradle's Continuous Mode via Ratpack's Gradle plugin.

If running the application via ./gradlew run --continuous or ./gradlew run -t for short, you will see your changes to source code be detected and applied.

IDEA integration

The Ratpack Gradle plugin has special support for IntelliJ IDEA. To open the project in IDEA, run:

./gradlew idea

This will generate a .ipr file that you can use to open the project in IDEA.

In the โ€œRunโ€ menu, you will find a run configuration for launching the Ratpack app from within your IDE.

Hot reloading is not supported in this mode.

More on Ratpack

To learn more about Ratpack, visit http://www.ratpack.io and join our slack channel https://slack-signup.ratpack.io/

example-ratpack-gradle-kotlin-app's People

Contributors

robfletcher avatar danhyun avatar rhart avatar geoand avatar beckje01 avatar jaguililla 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.