A fork of my petstore repository, but re-built with simple tools and no IoC container.
It uses the following tools:
- Simple, an embeddable high-performance HTTP server
- Molecule, a micro framework for web development
- Mustache for logic-less templating
- Plain JDBC
- No IoC container
- Gradle for the build system
To prepare the development and test databases in MySQL:
create database petstore_dev;
create user 'petstore'@'localhost' identified by 'petstore';
grant all on petstore_dev.* to 'petstore'@'localhost';
create database petstore_test;
create user 'testbot'@'localhost' identified by 'petstore';
grant all on petstore_test.* to 'testbot'@'localhost';
You need to install PhantomJS to run the end-to-end tests (tested on 1.9.7). Make sure you modify the end-to-end tests properties to indicate the path of the PhantomJS executable.
To build and run all tests:
./gradlew build
To prepare your database:
./gradlew db-migrate
Use the seeds to populate your MySQL database with sample data:
mysql -u petstore -p petstore_dev < ./server/src/main/scripts/seeds/items.sql
To run the application:
./gradlew run
If you use IntelliJ, just import the gradle build.