Skip to content

Commit

Permalink
Correct example code (#3408)
Browse files Browse the repository at this point in the history
The code as written did not work.  I was looking for a terse script to display some local html content, so i googled "node server static".  Although this article is only the 5th result, it should be suitable for copy-paste turnkey.

The article could use some other modernization as well, but I'll leave that out to avoid muddying the main point.
  • Loading branch information
sethbattin committed Oct 27, 2020
1 parent 20b7838 commit b075472
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -36,7 +36,7 @@ There is a good static file server called [node-static](https://github.com/cloud
var static = require('node-static');
var http = require('http');

var file = new(static.Server)();
var file = new(static.Server)(__dirname);

http.createServer(function (req, res) {
file.serve(req, res);
Expand Down

0 comments on commit b075472

Please sign in to comment.