Doesn't work with express
See original GitHub issueIt is a very interesting idea of super fast http server 😃. But unfortunately it is crashes on every request
on different places. I’m using node v8.9.4
.
When I try to use turbo-http
with express
everything is crashed.
$ npm i express-generator -g
$ mkdir turbu;
$ cd turbo
$ express
create : .
create : ./package.json
create : ./app.js
create : ./public
create : ./routes
create : ./routes/index.js
create : ./routes/users.js
create : ./views
create : ./views/index.jade
create : ./views/layout.jade
create : ./views/error.jade
create : ./bin
create : ./bin/www
create : ./public/javascripts
create : ./public/images
create : ./public/stylesheets
create : ./public/stylesheets/style.css
$ npm i @mafintosh/turbo-http
I Changed in bin/www
: http
-> @mafintosh/turbo-http
.
And after start and making request I see:
coderaiser@cloudcmd:~/2$ node bin/www
(node:12532) Warning: N-API is an experimental feature and could change at any time.
/home/coderaiser/2/node_modules/finalhandler/index.js:130
req.socket.destroy()
^
TypeError: req.socket.destroy is not a function
at Immediate.<anonymous> (/home/coderaiser/2/node_modules/finalhandler/index.js:130:18)
at Immediate._onImmediate (/home/coderaiser/2/node_modules/express/lib/router/index.js:635:15)
at runCallback (timers.js:791:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
When I try to use turbo-http
in edward error was:
/home/coderaiser/edward/node_modules/send/index.js:613
var ranges = req.headers.range
^
TypeError: Cannot read property 'range' of undefined
at SendStream.send (/home/coderaiser/edward/node_modules/send/index.js:613:28)
at /home/coderaiser/edward/node_modules/send/index.js:775:12
at FSReqWrap.oncomplete (fs.js:153:5)
When I try to use it with cloudcmd I got:
coderaiser@cloudcmd:~/cloudcmd$ node bin/cloudcmd.js
(node:12906) Warning: N-API is an experimental feature and could change at any time.
url: http://localhost:31337/
_stream_readable.js:718
if (state.pipesCount === 0)
^
TypeError: Cannot read property 'pipesCount' of undefined
at Request.Readable.unpipe (_stream_readable.js:718:13)
at unpipe (/home/coderaiser/cloudcmd/node_modules/unpipe/index.js:47:12)
at send (/home/coderaiser/cloudcmd/node_modules/finalhandler/index.js:289:3)
at Immediate.<anonymous> (/home/coderaiser/cloudcmd/node_modules/finalhandler/index.js:135:5)
at Immediate._onImmediate (/home/coderaiser/cloudcmd/node_modules/express/lib/router/index.js:635:15)
at runCallback (timers.js:791:20)
at tryOnImmediate (timers.js:751:5)
at processImmediate [as _immediateCallback] (timers.js:722:5)
Would be great to have ability to use turbo-http
with express 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Express Node.js doesn't work - Stack Overflow
So I have no idea of which port express is running on or whether or not it is running at all.
Read more >Express Static Not Working - The freeCodeCamp Forum
Hello! I recently started working through the Express tutorial and got snagged on the section where you setup the express.static middleware ...
Read more >Express/Node introduction - Learn web development | MDN
While Express itself is fairly minimalist, developers have created compatible middleware packages to address almost any web development problem.
Read more >Error handling - Express.js
Error Handling. Error Handling refers to how Express catches and processes errors that occur both synchronously and asynchronously. Express comes with a ...
Read more >App.get() not working with express.js - Glitch Support
Hello. I'm trying to create an API that connects to my bot's dashboard, but when I try to access the api page, it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m looking forward to trying this with Polka later today 🕺
The API is different in places from Node.js core. It most likely will never be fully compatible for perf reasons. What should happen (ideally…) would be for new cool JSON api frameworks to be built on top 😃