Prerequisites:
- JDK 1.8 or later
- Java 11
- Maven 3.2+ [brew install maven] (Mac)
- MySQL database [brew install mysql] (Mac)
- Launch Terminal
- Clone Repository from GitHub
-
Go inside the Project folder and copy contents of
src/main/resources/schema-mysql.sql
file. -
Connect to mysql cli on the terminal using command:
mysql.server start
mysql -u root -p (Enter your default password of root user)
-
Paste contents from
src/main/resources/schema-mysql.sql
file and hit enter. -
Exit
mysql cli -
Make sure you are in the
EventAnalytics
folder. -
Launch application using command:
./mvnw spring-boot:run
APIs should now be working !!!
POST : http://localhost:8080/analytics?user=kv90&event=click×tamp=1613685486860
GET : http://localhost:8080/analytics?timestamp=1613685486860