Code Monkey home page Code Monkey logo

peerjs-with-nodewebkit-tutorial's Introduction

peerjs-with-nodewebkit(NW.js)-tutorial

What's this?

This is a demo for A tutorial on using PeerJs in node-webkit app. It shows how to integrate PeerJs into your node-webkit/NW.js app, thus making your app able to do P2P communication.

How to run this demo?

It can be run on a single machine or two machines, your computer(s) needs to be connected to Internet.

run on a single machine

  1. Download node-webkit from here

  2. Install node.js

  3. Download this demo or git clone https://github.com/laike9m/peerjs-with-nodewebkit-tutorial.git

  4. Enter app directory, run npm install to install all dependencies

  5. Run the app. Node-webkit has great documentation on this.

  6. You'll see this window

  7. Click receive button first, then click send button.

If all goes well, you'll find a newly created file called received_gitignore in app's directory. This file is exactly the same as .gitignore, You just transferred it to yourself!

run on two machines

Step 1-6 is are the same, you should do them on both machines.

On one machine, click receive button, on the other machine, click send button. .gitignore will be transferred and saved as received_gitignore on receiving side.

Detailed implementation

See my tutorial: A tutorial on using PeerJs in node-webkit app

peerjs-with-nodewebkit-tutorial's People

Contributors

laike9m avatar

Watchers

James Cloos 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.