googlecreativelab / coder

A simple way to make web stuff on Raspberry Pi
http://goo.gl/coder
Apache License 2.0
2.42k stars 276 forks source link

Socket.io #88

Open Niramo opened 10 years ago

Niramo commented 10 years ago

How do i use socket.io in coder?

I don't know what to write in here: app.use(express.static(HERE));

Can anyone help?

My Code until now:

** var express = require("express"); var app = express(); var port = 3700; var io = require('socket.io').listen(app.listen(port)); app.get("/", function(req, res){ res.send("It works!"); });

app.listen(port); app.use(express.static(__dirname + exports.settings.appcurl)); console.log("Listening on port " + port);**

odensc commented 9 years ago

See #87. I put code examples of how to do it in the comments. Coder has it's own kind of "wrapper" for socket.io.