Add the following code to your project's shard.yml under:
dependencies
to use in production
- OR -
development_dependencies
to use in development
Renders graphics based on websocket binary commands into the canvas.
docker-compose build app wsproxy
Websocket connection uses proxy to connect to backend logic. There are no problems if it is launched in Docker.
The one thing is to connect wsproxy
service with native socket server. Docker compose uses specific network for this. Assign this network with external socket server (create it if it is not existed).
TCP_SERVER_HOST
and TCP_SERVER_PORT
is configured properly for wsproxy and connects to host and port of external socket serverdev
service is turned off (docker-compose stop dev
)docker-compose up -d app
- starts the service and listens on 9000 port (open browser window on this port, ex.: http://localhost:9000
)Do not start app
and dev
services simultaneously, they are interchangeable.
Please keep in mind that:
docker-compose.yml
and is called TCP_SERVER_HOST
and TCP_SERVER_PORT
; there are no defaults for it (this connects websocket proxy with TCP rendering server).docker-compose.yml
and is called WS_PORT
; default is: 3300
(this connects websocket proxy with browser). Host is taken from IP/domain name.app
service is turned off (docker-compose stop app
)docker-compose up -d dev
- starts the service and listens on 9000 portdocker-compose run --rm --service-ports dev
- launches the container sessionDo not start app
and dev
services simultaneously, they are interchangeable.
coffee
sources concatenates into the single file, compiles it to js and loads on the pagecoffee
sourcesapp
service) uses minified version of sources statically compiled into Crystal web server itselfgit checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)