Skip to content

Commit

Permalink
update example, with some content already written
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictarr committed Jan 13, 2013
1 parent 224df31 commit fe82dfc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions example/client.js
Expand Up @@ -11,8 +11,5 @@ reconnect(reloader(function (stream) {
stream.pipe(rText.createStream()).pipe(stream) stream.pipe(rText.createStream()).pipe(stream)
})).connect('/shoe') })).connect('/shoe')



console.log(widget)

//using the default template... //using the default template...
document.body.appendChild(widget(rText)) document.body.appendChild(widget(rText))
3 changes: 2 additions & 1 deletion example/package.json
Expand Up @@ -17,7 +17,8 @@
}, },
"scripts": { "scripts": {
"test": "tap test", "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)" "author": "'Dominic Tarr' <dominic.tarr@gmail.com> (http://dominictarr.com)"
} }
5 changes: 3 additions & 2 deletions example/server.js
Expand Up @@ -5,14 +5,15 @@ var http = require('http')
var join = require('path').join var join = require('path').join
var reloader = require('client-reloader') var reloader = require('client-reloader')


var text = require('../')() var rText = require('../')()
rText.push('open in multiple tabs and start editing!')


var PORT = 3000 var PORT = 3000


shoe(reloader(function (stream) { shoe(reloader(function (stream) {
console.log('connection') console.log('connection')
//echo server //echo server
stream.pipe(text.createStream()).pipe(stream) stream.pipe(rText.createStream()).pipe(stream)
stream.pipe(process.stderr, {end: false}) stream.pipe(process.stderr, {end: false})
})).install(http.createServer( })).install(http.createServer(
ecstatic(join(__dirname, 'static')) ecstatic(join(__dirname, 'static'))
Expand Down

0 comments on commit fe82dfc

Please sign in to comment.