console.say
A simple chat for your developer tools / firebug console. The server of the chat is written for node.js.
Server
First, you need to install the console.say
node.js package with the following command:
npm install console.say
Then you need to bind console.say to yout http server like so:
;
So, your server code should look something like this:
var app = ;var http = ; // serving the client pageapp; http; ;
Client
On the client page you will need to add the following two lines:
As you can see, both socket.io
and console.say
serve their own client scripts.
In the server example above, we serve to the client a file called index.html
.
The content of index.html
is the following:
console.say Hey! All the magic is in the console. Press CTRL+Shift+i on PC or CMD+ALT+i on Mac to open the console.
N-joy 😉