Code Monkey home page Code Monkey logo

remote-draw's Introduction

Remote-Draw

Collaborative painting on a canvas over the network, using socket.io.

Mouse + touch supported.
Legacy browsers not supported.

Lobby
Drawing session

Dependencies

Usage

Install dependencies

$ ./npm-ci.sh

Run locally

Start the backend server (frontend included):

$ cd backend
backend$ npm start

Afterwards, open http://localhost:42024 to enter the "lobby".
Open the website in multiple tabs to simulate multiple users.

Deploy on Heroku

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 --login is 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/

Deploy on a Linux server with HTTPS

If you want to run the app on your "own" server.

  • Register your internet domain: DOMAIN (e.g. example.com).
    Replace DOMAIN with 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 A and/or AAAA DNS records for DOMAIN and *.DOMAIN (or backend.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://DOMAIN in your browser.
    Authenticate using the dummy credentials user and password. (To disable authentication, remove the basicauth block from proxy/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.

remote-draw's People

Contributors

dependabot[bot] avatar heidemn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.