Permalink
Browse files

update example, with some content already written

  • Loading branch information...
1 parent 224df31 commit fe82dfcce0194d39ca94ac7e0a8f443eea38c8ae @dominictarr committed Jan 13, 2013
Showing with 5 additions and 6 deletions.
  1. +0 −3 example/client.js
  2. +2 −1 example/package.json
  3. +3 −2 example/server.js
View
3 example/client.js
@@ -11,8 +11,5 @@ reconnect(reloader(function (stream) {
stream.pipe(rText.createStream()).pipe(stream)
})).connect('/shoe')
-
-console.log(widget)
-
//using the default template...
document.body.appendChild(widget(rText))
View
3 example/package.json
@@ -17,7 +17,8 @@
},
"scripts": {
"test": "tap test",
- "build": "browserify client.js -o static/bundle.js --debug"
+ "build": "browserify client.js -o static/bundle.js --debug",
+ "start": "browserify client.js -o static/bundle.js --debug && node server.js"
},
"author": "'Dominic Tarr' <dominic.tarr@gmail.com> (http://dominictarr.com)"
}
View
5 example/server.js
@@ -5,14 +5,15 @@ var http = require('http')
var join = require('path').join
var reloader = require('client-reloader')
-var text = require('../')()
+var rText = require('../')()
+rText.push('open in multiple tabs and start editing!')
var PORT = 3000
shoe(reloader(function (stream) {
console.log('connection')
//echo server
- stream.pipe(text.createStream()).pipe(stream)
+ stream.pipe(rText.createStream()).pipe(stream)
stream.pipe(process.stderr, {end: false})
})).install(http.createServer(
ecstatic(join(__dirname, 'static'))

0 comments on commit fe82dfc

Please sign in to comment.