jshttp / spdy-push Goto Github PK
View Code? Open in Web Editor NEWSPDY Push helper - will by replaced by http-push
Home Page: https://github.com/jshttp/http-push
License: MIT License
SPDY Push helper - will by replaced by http-push
Home Page: https://github.com/jshttp/http-push
License: MIT License
right now it's push(res, [path], [options], [priority])
which has too much arity. i'm thinking about making it fluent, something like:
spdy(res).push(path)
.priority(7)
.send(new Buffer(1024))
.acknowledge( err => )
an alternative is to be more koa like:
var push = spdy(res).push(path)
push.type = 'json'
push.body = new Buffer(1024)
push.acknowledge( err => )
which of the three approaches do you guys prefer? i think i'm leaning towards the fluent approach.
While any-promise
is a nice solution, I think we could simplify maintaining Promises for dependencies further by using native promises. Node has supported Promise since 0.12
, and IE is the only modern browser that is missing Promise support(which can be polyfilled with babel-promise
or replaced with webpack externals). While this is a little more work for IE support I like that it makes the Promise implementation selection more predictable.
https://github.com/kevinbeaty/any-promise
this implementation supports more promise implementations and allows the end-user to configure the promise implementation.
only at 90%. i got lazy. sorry to ruin the badges guys
I am attempting to implement http2/spdy push in an express app. I had it working fine with the .push() method exposed by require('spdy'), however this would break in the case of a user aborting a request. When I saw that this module handled connection closing, I thought it might do the trick.
However, setting it up per the documentation I receive the following error:
/Users/colevarner/fullpower/node/motionxlive/node_modules/spdy/node_modules/spdy-transport/lib/spdy-transport/stream.js:662
return callback(err, push);
^
TypeError: callback is not a function
at /Users/colevarner/fullpower/node/motionxlive/node_modules/spdy/node_modules/spdy-transport/lib/spdy-transport/stream.js:662:14
at /Users/colevarner/fullpower/node/motionxlive/node_modules/spdy/node_modules/spdy-transport/lib/spdy-transport/connection.js:833:5
at Object.callback (/Users/colevarner/fullpower/node/motionxlive/node_modules/spdy/node_modules/spdy-transport/lib/spdy-transport/stream.js:463:5)
at Framer.tickSync (/Users/colevarner/fullpower/node/motionxlive/node_modules/spdy/node_modules/spdy-transport/lib/spdy-transport/protocol/base/scheduler.js:130:12)
at Framer.tick (/Users/colevarner/fullpower/node/motionxlive/node_modules/spdy/node_modules/spdy-transport/lib/spdy-transport/protocol/base/scheduler.js:108:13)
at /Users/colevarner/fullpower/node/motionxlive/node_modules/spdy/node_modules/spdy-transport/lib/spdy-transport/protocol/base/scheduler.js:102:10
at doNTCallback0 (node.js:407:9)
at process._tickCallback (node.js:336:13)
This seems like some sort of incompatibility with the spdy module.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.