You can contact the server to https://localhost:8002.
From host:
curl --request GET --url https://localhost:8002 --insecure
From server container:
curl --request GET --url https://localhost:8000 --insecure
Generate the certificates using the project gmarciani-ca.
- Generate a private key for yawa.com
- Generate a CSR for yawa.com
- Request a server certificate for yawa.com to the intermediate CA
- Generate a P12 archive
- Put the P12 file in
server/src/main/resources/secrets/certificates/yawa.p12
- Put the CA chain of the intermediate CA in
ops/resources/certificates/gmarciani-ca-chain.cert.pem
Check the returned certificate from the server:
openssl s_client -connect localhost:8002 -CAfile $ROOT_CA_PEM
Clients are built as part of the server build process.
cd server
gradle buildClients
Examples:
export YAWA_ENDPOINT="https://localhost:8002" # Server running in Docker
export YAWA_USERNAME="admin"
export YAWA_PASSWORD="password"
./yawac getGreetings
token=$(./yawac login username==$YAWA_USERNAME password==$YAWA_PASSWORD | jq -r '.accessToken')
./yawac getGreetings Authorization:"Bearer $token"
You can debug YAWA server from IntelliJ, as follows:
- Launch YAWA with Docker
- The debugger is listening on https://localhost:8006
- Create a debugging configuration with the following settings:
- Type: Remote JVM Debug
- Name: YAWA
- Debugger Mode: Attach to remote JVM
- Host: localhost
- Port: 8006
- Command line arguments for remote JVM (JDK9 or later): -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8006
- Use module classpath: server
- Wait for the server to be up and running
- Set your breakpoints
- Start the debugger in IntelliJ
- Send requests to the server
Generate a report with all the suggested dependencies updates:
gradle dependencyUpdates
gradle bootRun \
-Pprofile=local-h2