1
Fork 0

add code highlighting for old posts.

This commit is contained in:
Jan-Erik Rediger 2011-09-02 21:41:18 +02:00
parent ee97db037e
commit 1ceff97ea4
2 changed files with 11 additions and 8 deletions

View file

@ -19,12 +19,13 @@ You can find the script here: [watch.js](http://tmp.fnordig.de/watch.js). It's m
The small app.js is just this:
<pre><code>socket = new io.Socket('localhost');
socket = new io.Socket('localhost');
socket.connect();
socket.on('message', function(data){
data = JSON.parse(data);
if(data.reload)
window.location.reload();
});</code></pre>
});
{:lang="javascript"}
So next thing: individual pages for posts, maybe templates.

View file

@ -24,11 +24,13 @@ It's as easy as this:
});
server.listen(80, "2a01:xxxx:xxxx:xxxx::2");
console.log("Server running on localhost at port 80");
{:lang="javascript"}
Just pass the IPv6 address as the host parameter to `server.listen`.
This listens on just one IP; it's possible to listen on all, similar to the `0.0.0.0` for IPv4:
server.listen(80, "::0");</code></pre>
server.listen(80, "::0");
{:lang="javascript"}
Other things worth to mention: