Websocket based CloudEvents chat app.
//TODO
Install Knative Eventing and Serving from the Docs
Test the frontend only:
cd web
npm start
Check on React's README.md for more detailed info
Build the frontend:
cd web
npm run build4ko
or
cd web
npm run build
cp -r build/* ../../cmd/knative-go-chat-app/kodata/www/
cd ..
Now to run the ko image locally:
KO_DATA_PATH=./cmd/knative-go-chat-app/kodata go run cmd/knative-go-chat-app/main.go
Run using ko and kubernetes:
Set your KO_DOCKER_REPO
as stated here
then run:
simply run:
ko apply -f config/knative-go-chat-app.yaml
To build your own image do:
KO_DATA_PATH=./cmd/knative-go-chat-app/kodata ko publish -B ./cmd/knative-go-chat-app/main.go
Then modify the image URI
in the config/knative-go-chat-app.yaml
file
and finally run:
kubectl apply -f config/knative-go-chat-app.yaml
ko delete -f config/knative-go-chat-app.yaml
Thanks to @n3wscott for the original https://github.com/n3wscott/sockeye/tree/main/cmd/sockeye from which I based most of this project's structure from.