p1unit / Calendar-Slot-Booking-service

A Basic Calendar Slot Booking service which allows people to define their available slots on a day and other people to book them.
https://calendar-appointment-booking.herokuapp.com/
5 stars 0 forks source link

DB Setup Instructions in README.md #7

Open JatinJangir24 opened 3 months ago

JatinJangir24 commented 3 months ago

Hey, Punit! I came across your project while searching for a calendar application.

Sadly I couldn't setup it completely. (Your Heroku service is also down, but that's expected.)

I figured out that maven needed JAVA 8, otherwise it wont compile, After that running java -jar ./target/CalendarSlotBookingservice-0.0.1-SNAPSHOT.jar I get the following error:

blah...blah...
Caused by: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:460)
        at org.postman.CalendarSlotBookingservice.CalendarSlotBookingserviceApplication.props(CalendarSlotBookingserviceApplication.java:27)
        at org.postman.CalendarSlotBookingservice.CalendarSlotBookingserviceApplication.main(CalendarSlotBookingserviceApplication.java:20)
        ... 8 more

I believe this is caused by System.getenv("DATABASE_PATH"), System.getenv("USER") and System.getenv("PASSWORD") in src\main\java\org\postman\CalendarSlotBookingservice\CalendarSlotBookingserviceApplication.java file.

In your README you never stated how to setup the DB, tables, etc. I know this is a 4 year old project now, but it will be amazing if you can help here.

I was hoping to run this with a postgres DB, but since you are using MySQL, IDK if the switch is easy to do.

p1unit commented 2 months ago

Hi @JatinJangir24 I will check that, but you can set up the DB locally or host it in the cloud and pass the path and other values.