This project shows a very simple implementation of the depot application described in "Agile Web Development with Rails". The resources are just lifted straight from the sample code and used here. The current state is about step F. There are a good number of Rails features that are missing or implemented only partially, but it mainly works. The most difficult part is getting a Rails like ORM working on top of Mongo. I’m not implementing an ORM, just making the cart work.
This is a Vert.x 3.0 project using Gradle
In this example Vert.x is used embedded. I.e. we use the Vert.x APIs directly in our own classes rather than deploying the code in verticles.
You can run or debug the example in your IDE by just right clicking the main class and run as.. or debug as…
The build.gradle uses the Gradle shadowJar plugin to assemble the application and all it’s dependencies into a single "fat" jar.
To build the "fat jar"
./gradlew shadowJar
To run the fat jar:
java -jar build/libs/vertx-depot-3.0.0-SNAPSHOT-fat.jar
To run the DBSeed to fill the database with starting data:
java -jar build/libs/vertx-depot-3.0.0-SNAPSHOT-fat.jar com.baldmountain.depot.DbSeed
(You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don’t need to install Vert.x on the target machine).
Now point your browser at http://localhost:8080/store