##hair salon
a practice in java, gradle, sparkJava, postresql, junit, and fluentlenium.
- Clone this repository
- Install the Java SDK and Java SRE.
- Install gradle
- Open a terminal and run Postgres
$ postgres
- Open a new tab in terminal and create the hair_salon database:
psql
CREATE DATABASE hair_salon;
CREATE TABLE stylists (id serial PRIMARY KEY, created_at timestamp NOT NULL, updated_at timestamp, stylist_name varchar NOT NULL UNIQUE, stylist_specialty varchar NOT NULL, img_url varchar NOT NULL);
CREATE TABLE clients (id serial PRIMARY KEY, created_at timestamp NOT NULL, updated_at timestamp, client_name varchar NOT NULL, stylist_id integer NOT NULL);
CREATE TABLE visits (stylist_id integer NOT NULL, client_id integer NOT NULL, style_description varchar, style_review varchar, created_at timestamp NOT NULL, updated_at timestamp, visit_datetime timestamp);
(for the tests to pass): CREATE DATABASE hair_salon_test WITH TEMPLATE hair_salon;
**or** simply:
psql
CREATE DATABASE hair_salon;
psql hair_salon < hair_salon.sql
(for the tests to pass): CREATE DATABASE hair_salon_test WITH TEMPLATE hair_salon;
- Navigate back to the directory where this repository has been cloned and run gradle:
$ gradle run
- Open localhost:4567 in a browser.
No current known bugs.
To contact, leave a comment on Github.
- Java
- JUnit
- FluentLenium
- Gradle
- Spark
- PostgreSQL
MIT License
Copyright (c) 2016 Paul Hess