Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

readme fix

  • Loading branch information...
commit 834ce3a8796c7d5d81fdb11283bed24444afb38a 1 parent 9657317
Eric Schoffstall contra authored

Showing 2 changed files with 22 additions and 3 deletions. Show diff stats Hide diff stats

  1. +21 1 README.md
  2. +1 2  examples/test.coffee
22 README.md
Source Rendered
@@ -9,8 +9,28 @@ To install Protege, use [npm](http://github.com/isaacs/npm):
9 9
10 10 ## Usage
11 11
12   -Nothing here yet
  12 +Coffeescript:
13 13
  14 +```
  15 +require 'digest'
  16 +
  17 +server = digest.createServer 'username', 'password', (req, res) ->
  18 + res.writeHead 200, 'Content-Type': 'text/plain'
  19 + res.end 'Hello world! You are authenticated!'
  20 +server.listen 8080
  21 +```
  22 +
  23 +Javascript:
  24 +
  25 +```
  26 +require('digest');
  27 +
  28 +var server = digest.createServer('username', 'password', function(req, res) {
  29 + res.writeHead(200, {'Content-Type': 'text/plain'});
  30 + res.end('Hello world! You are authenticated!');
  31 +});
  32 +server.listen(8080);
  33 +```
14 34 ## Examples
15 35
16 36 You can view further examples in the [example folder.](https://github.com/Contra/node-digest/tree/master/examples)
3  examples/test.coffee
... ... @@ -1,10 +1,9 @@
1 1 digest = require '../lib/main.coffee'
2 2 config = digest.config
3 3
4   -server = digest.createServer 'admin', 'password', (req, res) ->
  4 +server = digest.createServer 'username', 'password', (req, res) ->
5 5 res.writeHead 200, 'Content-Type': 'text/plain'
6 6 res.end 'Hello world! You are authenticated!'
7   -
8 7 server.listen 8080
9 8
10 9 console.log 'Server running!'

0 comments on commit 834ce3a

Please sign in to comment.
Something went wrong with that request. Please try again.