Permalink
Browse files

added w3 module to bam

  • Loading branch information...
1 parent 1af60f0 commit 9752184988aa9bbf96eac2eb5485206157ab4dcf @twilson63 committed Aug 6, 2012
Showing with 15 additions and 22 deletions.
  1. +4 −14 lib/serve.js
  2. +2 −1 package.json
  3. +9 −7 src/serve.coffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -20,7 +20,8 @@
"flatiron": "*",
"jade": "*",
"zeke": "*",
- "zeke-markdown": "*"
+ "zeke-markdown": "*",
+ "w3": "*"
},
"devDependencies": {
"mocha": "*"
View
@@ -1,13 +1,15 @@
http = require 'http'
url = require 'url'
filed = require 'filed'
+w3 = require 'w3'
log = console.log
module.exports = (proj='.') ->
- server = http.createServer (req, resp) ->
- pathname = url.parse(req.url).pathname
- pathname = '/index.html' if pathname == '/'
- filed("#{proj}/gen#{pathname}").pipe(resp)
- server.listen 3000, ->
- log 'Listening on 3000...'
- log 'CTRL-C to exit..'
+ w3 3000, './gen'
+ # server = http.createServer (req, resp) ->
+ # pathname = url.parse(req.url).pathname
+ # pathname = '/index.html' if pathname == '/'
+ # filed("#{proj}/gen#{pathname}").pipe(resp)
+ # server.listen 3000, ->
+ # log 'Listening on 3000...'
+ # log 'CTRL-C to exit..'

0 comments on commit 9752184

Please sign in to comment.