Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Small cleanups in the bin/ files and fixed callback argument order in…

… bench.coffee
  • Loading branch information...
commit ca40051c281f2a10104e3c23a248a19fd2917dd1 1 parent c3fd1e0
@josephg josephg authored
Showing with 6 additions and 2 deletions.
  1. +2 −1  bin/exampleserver
  2. +1 −0  bin/sharejs
  3. +3 −1 scripts/bench.coffee
View
3  bin/exampleserver
@@ -55,7 +55,7 @@ var server = connect(
);
var options = {
- db: {type: 'memory'},
+ db: {type: 'none'},
auth: function(client, action) {
// This auth handler rejects any ops bound for docs starting with 'readonly'.
if (action.name === 'submit op' && action.docName.match(/^readonly/)) {
@@ -83,6 +83,7 @@ sharejs.server.attach(server, options);
server.listen(port);
console.log("Demos running at http://localhost:" + port);
+process.title = 'sharejs'
process.on('uncaughtException', function (err) {
console.error('An error has occurred. Please file a ticket here: https://github.com/josephg/ShareJS/issues');
console.error('Version ' + sharejs.version + ': ' + err.stack);
View
1  bin/sharejs
@@ -21,6 +21,7 @@ var port = options.port || 8000;
server.listen(port);
sys.puts('Server running at http://127.0.0.1:' + port + '/');
+process.title = 'sharejs'
process.on('uncaughtException', function (err) {
console.error('An error has occurred. Please file a ticket here: https://github.com/josephg/ShareJS/issues');
console.error('Version ' + sharejs.version + ': ' + err.stack);
View
4 scripts/bench.coffee
@@ -59,12 +59,14 @@ generator = (doc) ->
generate = ->
c = new Connection('http://localhost:8000/sjs')
- c.open 'spam6', (doc, error) ->
+ c.open 'spam6', (error, doc) ->
console.error error if error
apply = ->
#console.log "v: #{doc.version} length #{doc.snapshot.length}"
op = generator doc.snapshot
+ #console.time 'op'
doc.submitOp op, ->
+ #console.timeEnd 'op'
mark()
apply()
Please sign in to comment.
Something went wrong with that request. Please try again.