GithubHelp home page GithubHelp logo

yftsui / paint-io-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from goldhand/paint-io-server

0.0 1.0 0.0 13 KB

Paint app server for the websockets workshop

License: MIT License

Perl 23.82% Shell 1.52% JavaScript 74.66%

paint-io-server's Introduction

paint-io-server

Paint app server for the websockets workshop

Getting Started

Local

$ npm install
$ npm run watch

Apollo

bb watch

Workshop

* this github repository because its nice to do.

One team member should fork paint-io-client and the other should fork paint-io-server. Then clone each others repositories into your workspace directory (replace teammember with the correct user alias).

$ git clone https://github.com/teammember1/paint-io-client.git
$ git clone https://github.com/teammember2/paint-io-server.git

If you are working alone, you can just clone both paint-io-client and paint-io-server into the same workspace directory.

$ git clone https://github.com/goldhand/paint-io-client.git
$ git clone https://github.com/goldhand/paint-io-server.git

After running these, your workspace directory should look like:

.
./paint-io-client/
./paint-io-server/

or

.
./NodeJS-paint-io-client/
./NodeJS-paint-io-server/

If you used brazil to pull the packages down, add a remote url pointing to your's and your teammate's github remote so that you can collaborate using your teammates fork. Example adding a remote "teammemer1" pointing to my teammember's fork:

$ git remote add teammember1 https://github.com/teammember1/paint-io-client.git

Then you can pull your teammate's changes down:

$ git pull teammate1 mainline

Verify this by running:

$ git remote -v

And you should see something similar to:

origin	ssh://git.amazon.com/pkg/NodeJS-paint-io-server (fetch)
origin	ssh://git.amazon.com/pkg/NodeJS-paint-io-server (push)
teammate1	https://github.com/teammate1/paint-io-server (fetch)
teammate1	https://github.com/teammate1/paint-io-server (push)

Of course, replace "teammember1" with your teammate's github alias.

Install dependencies in each package (from within each package directory).

$ npm install

or

$ bb release

Run the server from within ./paint-io-server

$ npm run watch

or

$ bb watch

Inline instructions can be found in the src/socket.js. Each task is marked by as TODO x.x [description]. You should not need to make any changes outside of the src/socket.js.

Steps (with goals)

  1. Make the paint application collaborative using socket.io
  • Dispatch events to the Socket server
  • Receive events from the socket server
  1. Maintain a list of active users
  • Sync data across multiple clients
  • Use an acknowledgement in the emit call
  1. Open private chat with a single user
  • Send messages to single target

Optional

  • Demonstrate usefulness of client / server node architecture with flow type
  • Creating chat rooms
  • Scaling horizontally
  • At amazon

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.