Clone repo: git clone https://github.com/ianagpawa/random-quote-api.git
Install Java 11 SE
:
- Download OpenJDK for Java SE 11
- Create Java folder in
C:\Program Files
. - Extract contents of downloaded openjdk11 folder.
- Copy
jdk-11
folder toC:\Program Files\Java
. - Set Java PATH
C:\Program Files\Java\jdk-11\bin
.
- Create Java folder in
- Reference for installation instructions
Install Gradle
:
- Spring Web
- Spring Data JPA
- H2 Database
In terminal, navigate to folder director and use the following command to build the project:
gradle build
In terminal, navigate to folder director and use the following command to perform a clean build of the project:
gradle clean build
In terminal, navigate to folder director and use the following command to run the service locally on port 8080
.
gradle bootRun
curl -v localhost:8080/quotes
curl -v localhost:8080/random
curl -v localhost:8080/quotes/{id}
curl -X POST localhost:8080/quotes -H 'Content-type:application/json' -d '{"name": "{name}", "content": "{content}", "source": "{source}"}'
curl -X PUT localhost:8080/quotes/{id} -H 'Content-type:application/json' -d '{"name": "{name}", "content": "{content}", "source": "{source}"}'
curl -X DELETE localhost:8080/quotes/{id}
Ian Agpawa [email protected]