Skip to content

A version of the petstore built without frameworks

Notifications You must be signed in to change notification settings

shisheng-1/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
  • 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

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 92.7%
  • HTML 2.6%
  • Ruby 2.4%
  • CSS 1.8%
  • Shell 0.5%