You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(mind you, I have no idea if this code does what I think it does, because...)
events.js:141
throw er; // Unhandled 'error' event
^
Error: Protocol "http:" not supported. Expected "https:".
at new ClientRequest (_http_client.js:53:11)
at Object.exports.request (http.js:31:10)
at ClientSession.newStream [as _createNewStream] (/Volumes/alien/projects/digs/digs-graft/node_modules/graft/node_modules/jschan/lib/spdy/client.js:104:18)
at createChannel (/Volumes/alien/projects/digs/digs-graft/node_modules/graft/node_modules/jschan/lib/spdy/client.js:142:11)
at ClientSession.WriteChannel (/Volumes/alien/projects/digs/digs-graft/node_modules/graft/node_modules/jschan/lib/spdy/client.js:156:10)
at SPDYClient.Client._write (/Volumes/alien/projects/digs/digs-graft/node_modules/graft/lib/client.js:36:30)
at doWrite (/Volumes/alien/projects/digs/digs-graft/node_modules/graft/node_modules/readable-stream/lib/_stream_writable.js:279:12)
at writeOrBuffer (/Volumes/alien/projects/digs/digs-graft/node_modules/graft/node_modules/readable-stream/lib/_stream_writable.js:266:5)
at SPDYClient.Writable.write (/Volumes/alien/projects/digs/digs-graft/node_modules/graft/node_modules/readable-stream/lib/_stream_writable.js:211:11)
at Graft.ondata (/Volumes/alien/projects/digs/digs-graft/node_modules/graft/node_modules/readable-stream/lib/_stream_readable.js:572:20)
UPDATE: I realize this may be the fault of the server code. Here's the server, in all its glory:
'use strict';process.env.DEBUG='digs-graft*';letgraft=require('graft');letspdy=require('graft/spdy');letrc=require('rc-yaml');letthrough=require('through2');letpkg=require('./package.json');letdomain=require('domain');letdebug=require('debug')('digs-graft');letcfg=rc(pkg.name,{port: 3447});letdigs=graft();letrouter=graft();functiondata(){returnthrough.obj(function(msg,enc,done){letdebug=require('debug')('digs-graft:data');debug(msg);});}functionregister(){returnthrough.obj(function(msg,enc,done){letdebug=require('debug')('digs-graft:register');debug(`client ${msg.id} registered`);letd=domain.create();d.on('error',function(err){debug(err);});d.run(function(){router.branch(function(){returnmsg.data;// branch if data property is truthy},data());});});}digs.where({topic: 'register'},register());spdy.server({port: cfg.port}).pipe(digs);
The text was updated successfully, but these errors were encountered:
given a spdy server created with
graft/spdy
on port 3447, I have this client code, modeled after the example inREADME.md
:(mind you, I have no idea if this code does what I think it does, because...)
UPDATE: I realize this may be the fault of the server code. Here's the server, in all its glory:
The text was updated successfully, but these errors were encountered: