A sample frontend app wrapped in Spring Boot
- Spring Boot for app bits, using webflux runtime
- Vue.js for frontend, inspired by TodoMVC Vue App, difference is this one is vendored as a Spring Boot app and calls a backing endpoint (
/todos
)
This application assumes the /todos
endpoint is exposed from the same "origin". Because of this its best to use this application behind the todos-edge which will serve as a gateway and single origin to the client for both loading todos-webui
and for proxying API calls to /todos
.
Spring Boot property handling makes it easy to implement custom properties, for example todos.webui.placeholder
can be set to whatever you'd like and it will show up on the UI.
- Consider forking this project then clone to dev machine
- cd into project
- mvnw clean package
- modify
manifest.yml
for your cloudfoundry tastes (custom route perhaps?) - login to PCF (or PWS)
- cf push (awwwweee yeah)
To have data sent to the backend run this app with todos-edge and access UI via the edge's published endpoint (See todos-edge README).
Running this app without an edge is fine, however the data will just be saved to local browser storage and bark because you're not plugged up to the api. In this case the app is essentially "vendoring" a frontend application (vue.js,html,css) and serving it over the JVM instead of a plain-ole http-server (such as apache-httpd or nginx).
You can clone, build, run then access localhost:8080
or change the port.
java -jar ./target/todos-webui-1.0.0.SNAP.jar \
--server.port=whatever
WebUI running