This is a React.js application that is part of an interactive Knative and serverless tutorial called the Compile Driver, a ride at an imaginary theme park called Coderland. This application uses your computer camera to allow you to take a snapshot. The snapshot is then sent to a service that overlays the photo, and the result is sent back to this application and displayed.
To run this demo, you'll need to point it to a service that accepts a JPEG picture as a base64 string in a JSON document and returns a base64 string (for the updated image) in a JSON document.
image-overlay is the service that is used with this application. It is run as a Knative service in OpenShift.
- You must set the REACT_APP_OVERLAY_URL environment variable to point to the service that does the image overlay.
- You must set the REACT_APP_OVERLAY_MESSAGE environment variable. This is the message that appears on the photo, e.g. "Hello from Coderland!"
There are options for running this program:
- Run it from the command line
REACT_APP_OVERLAY_URL=http://myservice-myproject.mydomain.com REACT_APP_OVERLAY_MESSAGE='Hello from Coderland!' npm start
- Run it in a Linux container
docker build -t coderland .
docker run -p 3000:3000 -e REACT_APP_OVERLAY_URL http://myservice-myprojecct.mydomain.com -e REACT_APP_OVERLAY_MESSAGE 'Hello from Coderland!' coderland
- Open browser to
- Run it in OpenShift
Coderland 🎢🚀🎡 is a place for learning. Developer Training and Red Hat Software: Red Hat Developer.