FastStatAPI
build:
git clone https://github.com/timxor/FastStatAPI.git
cd FastStatAPI/faststat-api
mvn clean package
run the app:
# ls -lb target/*.jar
java -jar target/FastStatAPI-0.0.1-SNAPSHOT.jar
open the browser or query the api from terminal:
curl http://localhost:8080/faststat | jq | less
curl -X POST -H "Content-Type: text/plain" -d "MyFormula = (PTS+(REB-AST))/2" http://localhost:8080/faststat | jq
http://localhost:8080/faststat
the sample.json input file is used to seed the responses.
it's located here:
/FastStatAPI/faststat-api/src/main/resources/static/sample.json
./faststat-api/src/main/resources/static/sample.json
with jq pretty print:
curl http://localhost:8080/faststat | jq | less
or with curl:
curl http://localhost:8080/faststat
curl -X POST -H "Content-Type: text/plain" -d "MyFormula = (PTS+(REB-AST))/2" http://localhost:8080/faststat | jq
Confirm you have java and maven installed.
sdk list java
sdk install java 17.0.8-graalce
sdk use java 17.0.8-graalce
sdk default 17.0.8-graalce
confirm java 17 is the current version:
java -version
sdk install springboot
brew install maven
confirm maven is installed:
mvn -v