Skip to content

Instantly share code, notes, and snippets.



Created Jun 24, 2012
What would you like to do?
example for issue in node-static 0.5.9
function onload()
// Firefox
document.getElementById("test").textContent = "good :)";
// Internet Explorer
document.getElementById("test").innerText = "good :)";
files must be located within the following directory layout:
| server.js
<title>node-static 0.5.9 bug</title>
<script type="text/javascript" src="code.js"></script>
<body onload="onload();">
<div id="test">bad :(</div>
var static = require('node-static');
var file = new(static.Server)('./public');
require('http').createServer(function (request, response) {
request.addListener('end', function () {
file.serve(request, response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment