add code highlighting for old posts.
This commit is contained in:
parent
ee97db037e
commit
1ceff97ea4
|
@ -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:
|
The small app.js is just this:
|
||||||
|
|
||||||
<pre><code>socket = new io.Socket('localhost');
|
socket = new io.Socket('localhost');
|
||||||
socket.connect();
|
socket.connect();
|
||||||
socket.on('message', function(data){
|
socket.on('message', function(data){
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
if(data.reload)
|
if(data.reload)
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});</code></pre>
|
});
|
||||||
|
{:lang="javascript"}
|
||||||
|
|
||||||
So next thing: individual pages for posts, maybe templates.
|
So next thing: individual pages for posts, maybe templates.
|
||||||
|
|
|
@ -24,11 +24,13 @@ It's as easy as this:
|
||||||
});
|
});
|
||||||
server.listen(80, "2a01:xxxx:xxxx:xxxx::2");
|
server.listen(80, "2a01:xxxx:xxxx:xxxx::2");
|
||||||
console.log("Server running on localhost at port 80");
|
console.log("Server running on localhost at port 80");
|
||||||
|
{:lang="javascript"}
|
||||||
|
|
||||||
Just pass the IPv6 address as the host parameter to `server.listen`.
|
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:
|
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:
|
Other things worth to mention:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue