github.com/fruktorum/tilerender-client
1.1.1 / published Jun 16, 2022 / repository
Renders graphics based on websocket binary commands into the canvas
TileRender - Client-Side
Renders graphics based on websocket binary commands into the canvas.
Installation
- Install Docker, Docker Compose
docker-compose build app wsproxy
Usage
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).
- Be sure that
TCP_SERVER_HOSTandTCP_SERVER_PORTis configured properly for wsproxy and connects to host and port of external socket server - Please be sure that
devservice 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:
- Websocket Proxy's binding host and port configure via environment variables in
docker-compose.ymland is calledTCP_SERVER_HOSTandTCP_SERVER_PORT; there are no defaults for it (this connects websocket proxy with TCP rendering server). - Websocket Proxy's listening port configures via environment variables in
docker-compose.ymland is calledWS_PORT; default is:3300(this connects websocket proxy with browser). Host is taken from IP/domain name.
Development
Launch in dev mode
- Please be sure that
appservice is turned off (docker-compose stop app) -
- If needed only the development of frontend coffee sources:
docker-compose up -d dev- starts the service and listens on 9000 port - If needed the development of internal HTML or server sources itself:
docker-compose run --rm --service-ports dev- launches the container session
- If needed only the development of frontend coffee sources:
Do not start app and dev services simultaneously, they are interchangeable.
How it looks
- Front sources are placed into coffee folder
- It is not needed to restart the server to update files
- On each request all
coffeesources concatenates into the single file, compiles it to js and loads on the page - Native js files are not supported, the engine handles only
coffeesources - Production mode (the
appservice) uses minified version of sources statically compiled into Crystal web server itself
Contributing
- Fork it (https://github.com/fruktorum/tilerender-client/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Merge Request
Contributors
- SlayerShadow - creator and maintainer