node.js socket.io: socket bakotzeko sesiƱue sortu: txat-an bigarren partie

Bueno ba hamen gabiltzez node.js eta socket.io-gaz barriro be, 1go partie ikusteko hamen linke: http://zital.hackinbadakigu.net/?p=273 functions.js: module.exports = { in_array: function (needle, haystack, argStrict) { // Checks if the given value exists in the array // // version: 1109.2015 // discuss at: http://phpjs.org/functions/in_array // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: […]

debian: node.js eta socket.io-gaz txat bat egin

node.js instalateko oin momentutan SID-en dau :) su aptitude install nodejs npm exit npm install socket.io nano server.js var server = require(“socket.io”).listen(6969); server.sockets.on(“connection”, function(message) { message.on(“newMessage”, function(data) { server.sockets.emit(“sendEvent”, data); }); }); nano index.html <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”utf-8″ /> <title>Online chat</title> <style> body { color: #333; background: #333; font-family: “Helvetica”, Arial; font-size: […]