Cyan
Error sending request too quick to npm
I'm trying to make create a mirror for about 2000 packages in npm.
For each package, it fetches
https://registry.npmjs.org/<package>
and the downloads (https://api.npmjs.org/downloads/point/last-month/<package>
) with Promise.all()
But there is a few errors while fetching.
5 replies
koa-router behaves different in Deno
Trying to run following script
With Node.js,
request
http://127.0.0.1:2000/
gives me console.log('hello')
with Content-Type
set to text/javascript
.
But with Deno,
request the same url, gives console.log('hello')
, but the Content-Type
is set to text/plain
. Then, your browser will refuse to execute the script if the Content-Type
is not correct. And everything is broken.
I can't simply switch to Oakserver, this is just a minimal repro. In fact, the actual project is so large and coupled with Koa deeply.
Also ctx.type
works correctly without koa-router
. I don't know what is going on underlying koa-router
4 replies