Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express code deprecated #6

Open
HeroicNate opened this issue Aug 6, 2015 · 1 comment
Open

Express code deprecated #6

HeroicNate opened this issue Aug 6, 2015 · 1 comment

Comments

@HeroicNate
Copy link

No description provided.

@diegoMontesinos
Copy link

Yeah, the server.js code is deprecated.
I try this:

// Create the tuio server and express app
var express = require("express");
tuioServer = require("tuio");
var _socketPort = express().listen(5000, function () {

    // Init TUIO client
    tuioClient = new Tuio.Client({
        host: "http://localhost:" + TUIO_SERVER_PORT
    });

    // Attach events
    tuioClient.on("connect"          , onTuioConnect);
    tuioClient.on("addTuioCursor"    , onAddTuioCursor);
    tuioClient.on("updateTuioCursor" , onUpdateTuioCursor);
    tuioClient.on("removeTuioCursor" , onRemoveTuioCursor);
    tuioClient.on("addTuioObject"    , onAddTuioObject);
    tuioClient.on("updateTuioObject" , onUpdateTuioObject);
    tuioClient.on("removeTuioObject" , onRemoveTuioObject);
    tuioClient.on("refresh"          , onRefresh);
    tuioClient.connect();
});

// Init the TUIO server
tuioServer.init({
    oscPort: 3334,
    oscHost: "0.0.0.0",
    socketPort: _socketPort
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants