Skip to content

bredele/interact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interact experimental

Interact creates a peer to peer connection between your desktop and your mobile device.

See remote controller or drawing board.

Installation

$ npm install interact

Getting started

Server

Interact is a nodejs server. It's API inherits from express and is very clean and easy. Let's say you want to create a communication channel called foo:

var app = require('interact')();

//create coomunication channel
app.room('foo', 'view');

see api for more details.

Well, that's it! Nothing more.

Client

Interact is also a web socket client.

<script src="/interact/interact.js"></script>

Communicate with an interact server is dead simple!

var channel = interact('foo');
channel.emit('next');
channel.on('previous', function() {
 //do something
});

Ecosystem

My wish is to create an ecosytem of self-contained apps around Interact. An app is a service that you could reuse multiple times and in separate projects. For example, use your mobile as a remote controller and pair it (thanks to a qrcode) with a web presentation (slides) would be as easy as:

interact('foo')
  .use(qrcode)
  .use(controller)
  .use(slides)

API

Server

app.room(name, view, token)

Create an interact room. A room is a peer to peer channel between a client and your server.

app.room('foo', 'view');

The second argument is a view redirection. It's the view the server will serve to the client.

About

Interact with your desktop from your mobile device

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published