Collaborative painting on a canvas over the network, using socket.io.
Mouse + touch supported.
Legacy browsers not supported.
- Reverse Proxy: Caddy 2 https://caddyserver.com/
- Backend: Node.js 14 (version 12 probably also works)
- Messaging: https://socket.io/
- Server: https://github.com/expressjs/express
- UI: https://github.com/hustcc/timeago.js
$ ./npm-ci.shStart the backend server (frontend included):
$ cd backend
backend$ npm startAfterwards, open http://localhost:42024 to enter the "lobby".
Open the website in multiple tabs to simulate multiple users.
Preparations (once):
- Sign up for Heroku free tier.
- Install Heroku CLI.
- Clone this repo.
heroku create YOUR_APP_NAME(once)
(Re-)Deploy:
./heroku-deploy.sh --login
(Option--loginis probably only needed for first run.)
(See script source for options to configure the app.)- Browser should open automatically; if not, open:
https://YOUR_APP_NAME.herokuapp.com/
If you want to run the app on your "own" server.
- Register your internet domain:
DOMAIN(e.g.example.com).
ReplaceDOMAINwith your custom domain everywhere below. - Start a server, e.g. on EC2.
Make sure that ports 80 + 443 are publicly available for requesting an HTTPS certificate using ACME (Let's Encrypt). - Add
Aand/orAAAADNS records forDOMAINand*.DOMAIN(orbackend.DOMAIN). - Install Node.js 12.
- Install Caddy 2 (used as reverse proxy): https://caddyserver.com/docs/download
(Use one of the package manager options, if available for your distribution.) - Clone the Git repo on the server.
./npm-ci.sh./run.sh DOMAIN
(Press Ctrl-C to exit.)- Open the website
https://DOMAINin your browser.
Authenticate using the dummy credentialsuserandpassword. (To disable authentication, remove thebasicauthblock fromproxy/Caddyfile.)
If you get a TLS error, then probably Let's Encrypt can't access your server. Look at the Caddy console output for details.

