You can work with this project locally or in Github Codespaces. With Codespaces you get 120 hours free per month, so keep within your quota.
java --version
mvnw.cmd clean install (Windows)
./mvnw clean install (Mac/Codespaces/Linux)
For local testing before pushing the code use the following
mvnw.cmd spring-boot:run -pl java-api (Windows)
./mvnw spring-boot:run -pl java-api (Mac/Codespaces/Linux)
Frontend URL - http://localhost:8080/index.html
Further Reference
Note: From Codespaces, you can allow public access to the running application, see here for details. This will allow others outside of your codespace to navigate to the url - this can be useful for team testing or demos. Alternatively you can push the code to a server as in the next section.
Click on codespace
It will open new window with Visual studio in it
In Editor in terminal first run
mvnw clean install
Once that is finished run below command
./mvnw spring-boot:run -pl java-api
Once finished on right bottom corner it asks for "Open in Browser" and "Make Public". Click on "Make Public"
Go to Ports, you will find an URL where application can be accessed
This is completely Optional for coding challenge, make sure you will not enter any payment method to fly.io
Register for an account on fly.io
Install flyctl
Authorise flyctl to access your fly account
flyctl auth login
Generate a new app, enter a unique name or generate one
flyctl apps create
Enter the app name into fly.toml
Manually trigger the Java Deploy to fly.io workflow (or edit the action to trigger on push to main branch)
App should be available on {appname}.fly.dev
Note: you might need to scale the app resources
fly scale memory 2048 -a {appname} (To scale memory)
or
fly scale vm shared-cpu-2x {appname} (To scale CPU)
See fly documentation for more guidance