An experiment with creating a full stack application with React, Dropwizard, Ebean, RabbitMQ and Docker.
See common/common-client and todo/todo-client.
- Install Node.js and npm.
- Globally install Grunt CLI:
npm install -g grunt-cli
- Install dependencies in project root:
npm install
(Maven will also automatically do this when runningmvn install
.)
The frontend is automatically bundled into the backend when that is built, so it is only necessary to run this directly when developing.
Run grunt dev
and open http://localhost:8080
Run with grunt test
, maven test
, or via an IDE.
Create Mocha run configurations and point them at the test folder in each project. See the Grunt setup for the options needed.
See common/common-server and todo/todo-server.
- Install Java 8 JDK.
- Install Maven 3.
- Install RabbitMQ (also needs the Erlang VM).
- Install Docker (or Docker Toolbox).
Run mvn install
in the root of the project and then java -jar todo\todo-server\target\todo-server-0.0.1-SNAPSHOT.jar server todo\todo-server\config\config.yml
.
Create an IntelliJ run configuration for TodoListApplication, then add program arguments: server todo\todo-server\config\config.yml
and VM options: -javaagent:$USER_HOME$\.m2\repository\org\avaje\ebeanorm\avaje-ebeanorm-agent\4.5.3\avaje-ebeanorm-agent-4.5.3.jar
As above, but with the argument workers
instead of server
.
Run maven test
or via an IDE.
The browser used for integration tests can be selected via the WEBDRIVER
environment variable, either Firefox or Chrome (the default).
PhantomJS is unfortunately not supported as it uses an old version of Selenium which causes classpath issues.
When creating run configurations for tests, add the same VM options as above.
You can make this the default by adding it under Run - Edit Configurations - Defaults - JUnit.
It ensures that Ebean can process the classes that are persisted, even when not running via Maven (where a plugin handles it as part of the build).