0

I have a nodejs server that I use to broadcast information to a web page.

I also have a program written in node too that I use in command line.

In need the server to gather information from the command line program and then to send it to the web page.

Server :

var server = require('http').createServer();
var io = require('socket.io')(server);

Client :

var io = require('socket.io');
var socket = io.connect('http://127.0.0.1:1337');

I don't know how I can do this because, at the moment, the client doesn't start. Can't I use socket.io as a client just like on a web page ?

Thanks for your answers.

LeNiglo
  • 71
  • 8
  • possible duplicate of [Is it possible to set up a socket.io client running (server-side) on a node.js server?](http://stackoverflow.com/questions/9687561/is-it-possible-to-set-up-a-socket-io-client-running-server-side-on-a-node-js-s) – laggingreflex Feb 07 '15 at 14:57
  • exactly, thank you :) – LeNiglo Feb 08 '15 at 19:35

0 Answers0