Ratpack example app with Vue.js + Webpack frontend
- Java 8 SDK for Ratpack backend
- For running browser functional tests either
- Chrome (default)
The Ratpack backend app uses an in-memory H2 database, so it doesn't require any other database to be installed on your machine.
To run the backend in development mode, run
To enable Gradle's continuous mode to watch for server changes and reload them, add
./gradlew run -t
The Vue.js frontend app is located in the src/app folder.
To install the node dependencies, run
cd src/app npm install
To run the webpack dev server on localhost:8080, run
cd src/app npm run dev
The Webpack dev server proxies API requests to the Ratpack server running on port 5050, so during development you can take advantage of the features of the Webpack dev server like live reloading.
To run unit and API functional tests for the Ratpack app, run
Since the browser tests rely on the Webpack assets being built which can take a little while, I split those tests into their own Gradle task
By default, the browser functional tests will run in Chrome. To run the tests in Firefox, run
gradlew -Dgeb.env=firefox testBrowser
cd src/app npm run test
And finally to run all the different types of tests, run
The app uses the Gradle Shadow plugin for packaging