From 9fda8a83af25484bff47d0dd80e768f54bfdac7d Mon Sep 17 00:00:00 2001 From: sesethud Date: Tue, 15 Sep 2020 11:49:04 +0200 Subject: [PATCH 1/4] First commit - Added Doctor class. --- SparkJavaWithPostgresAndBootstrap.iml | 52 ------------------- .../co/projectcodex/hackathon/Doctor.java | 41 +++++++++++++++ 2 files changed, 41 insertions(+), 52 deletions(-) delete mode 100644 SparkJavaWithPostgresAndBootstrap.iml create mode 100644 src/main/java/co/projectcodex/hackathon/Doctor.java diff --git a/SparkJavaWithPostgresAndBootstrap.iml b/SparkJavaWithPostgresAndBootstrap.iml deleted file mode 100644 index 3ee36a6..0000000 --- a/SparkJavaWithPostgresAndBootstrap.iml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/co/projectcodex/hackathon/Doctor.java b/src/main/java/co/projectcodex/hackathon/Doctor.java new file mode 100644 index 0000000..9c43db4 --- /dev/null +++ b/src/main/java/co/projectcodex/hackathon/Doctor.java @@ -0,0 +1,41 @@ +package co.projectcodex.hackathon; + +public class Doctor { + + String firstName; + String lastName; + String specialty; + + public Doctor() { + } + + public Doctor(String firstName, String lastName, String specialty) { + this.firstName = firstName; + this.lastName = lastName; + this.specialty = specialty; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getSpecialty() { + return specialty; + } + + public void setSpecialty(String specialty) { + this.specialty = specialty; + } +} From e48630a9a7e9e771cfe49cac7a6867579414b17a Mon Sep 17 00:00:00 2001 From: Phumlani Arendse Date: Tue, 15 Sep 2020 12:11:36 +0200 Subject: [PATCH 2/4] Connected database --- SparkJavaWithPostgresAndBootstrap.iml | 52 +++++++++++++++++++ .../java/co/projectcodex/hackathon/App.java | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 SparkJavaWithPostgresAndBootstrap.iml diff --git a/SparkJavaWithPostgresAndBootstrap.iml b/SparkJavaWithPostgresAndBootstrap.iml new file mode 100644 index 0000000..3ee36a6 --- /dev/null +++ b/SparkJavaWithPostgresAndBootstrap.iml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/co/projectcodex/hackathon/App.java b/src/main/java/co/projectcodex/hackathon/App.java index 697ec24..42ca027 100644 --- a/src/main/java/co/projectcodex/hackathon/App.java +++ b/src/main/java/co/projectcodex/hackathon/App.java @@ -54,7 +54,7 @@ public static void main(String[] args) { staticFiles.location("/public"); port(getHerokuAssignedPort()); - Jdbi jdbi = getJdbiDatabaseConnection("jdbc:postgresql://localhost/spark_hbs_jdbi"); + Jdbi jdbi = getJdbiDatabaseConnection("jdbc:postgresql://localhost/spark_hbs_jdbi?username=macgyver&password=mac123"); get("/", (req, res) -> { From 75c6e3e2c5a3eb960c1c1ca074087915b786bdbb Mon Sep 17 00:00:00 2001 From: Phumlani Arendse Date: Tue, 15 Sep 2020 12:18:20 +0200 Subject: [PATCH 3/4] Place Holder added --- src/main/resources/templates/index.handlebars | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/templates/index.handlebars b/src/main/resources/templates/index.handlebars index 1ed6eff..08ae5e7 100644 --- a/src/main/resources/templates/index.handlebars +++ b/src/main/resources/templates/index.handlebars @@ -11,7 +11,7 @@
- + What does your friends call you
Please provide a valid name. @@ -20,14 +20,14 @@
- + What is ths name after the name your friends called you.
- - + + Where do we email you.
From 94d8d75ba25307364d1b2a466066dc7719b36ac7 Mon Sep 17 00:00:00 2001 From: sesethud Date: Tue, 15 Sep 2020 12:20:19 +0200 Subject: [PATCH 4/4] adding untracked file --- SparkJavaWithPostgresAndBootstrap.iml | 52 +++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 SparkJavaWithPostgresAndBootstrap.iml diff --git a/SparkJavaWithPostgresAndBootstrap.iml b/SparkJavaWithPostgresAndBootstrap.iml new file mode 100644 index 0000000..3ee36a6 --- /dev/null +++ b/SparkJavaWithPostgresAndBootstrap.iml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file