|
|
@ -5,12 +5,12 @@ var io = require('socket.io')(http); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const cors = require('cors') |
|
|
|
const cors = require('cors')// epitrepi sundeseis apo cross origin
|
|
|
|
app.use(cors()); |
|
|
|
|
|
|
|
io.on('connection', s => { |
|
|
|
console.error('socket connection'); |
|
|
|
|
|
|
|
//perimeno na steilei dedomena o client kai otan ta steilei ta ektuponi.
|
|
|
|
io.on('data', function(s) { |
|
|
|
console.log('Got', s); |
|
|
|
}) |
|
|
@ -19,4 +19,4 @@ io.on('connection', s => { |
|
|
|
|
|
|
|
|
|
|
|
http.listen(5000, () => console.error('listening on http://localhost:5000/')); |
|
|
|
console.error('socket.io example'); |
|
|
|
console.error('socket.io example'); |