Skip to content

simplets/simple-petstore

 
 

Repository files navigation

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
  • 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

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 97.2%
  • Groovy 1.2%
  • Other 1.6%