Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #95 from sebs/master

Making the examples a little more cut&paste friendly
  • Loading branch information...
commit 36026a3c77279df18f71b9f33411725214236d33 2 parents 779b689 + 0294a0e
@phstc phstc authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 README.md
View
4 README.md
@@ -52,6 +52,8 @@ This is the default setting.
To serve files under a directory, simply call the `serve` method on a `Server` instance, passing it
the HTTP request and response object:
+
+ var static = require('node-static');
var fileServer = new static.Server('./public');
@@ -87,6 +89,8 @@ More on intercepting errors bellow.
An optional callback can be passed as last argument, it will be called every time a file
has been served successfully, or if there was an error serving the file:
+ var static = require('node-static');
+
var fileServer = new static.Server('./public');
require('http').createServer(function (request, response) {
Please sign in to comment.
Something went wrong with that request. Please try again.