Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build Status

About

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

Preparing

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';

Building

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

Migrating the database

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

Running

To run the application:

./gradlew run

IntelliJ

If you use IntelliJ, just import the gradle build.

About

A version of the petstore built without frameworks

Resources

Packages

No packages published