Closed ericfong closed 8 years ago
@ericfong It looks like this PR got a bit lost, is it still relevant? Should I merge it?
Looks like dathub.org is down, any alternative?
Mmm, hard to find npm repo mirror that allow Access-Control-Allow-Origin ...
@ericfong how about npmsearch? https://github.com/solids/npmsearch
Here is an example use case in gulp. https://github.com/gulpjs/plugins/blob/master/src/scripts/controller/pluginList.js#L27-L38
BTW, the page has been down for a while because of dathub. Something weird. http://docs.deployd.com/modules/
XMLHttpRequest cannot load http://npm.dathub.org/api/rows?start=dpd-. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://docs.deployd.com' is therefore not allowed access.
Even if calling url directly, we could get nothing:
{
"dat": true,
"version": "7.0.4"
}
The problem is we don't have a real server for the doc. We just using github page for that. Any help on that?
Just a simple cross domain ajax call....
@ericfong npmsearch allows access from any site. Looks enough...?
res.setHeader('Access-Control-Allow-Origin', '*');
https://github.com/solids/npmsearch/blob/master/lib/routes.js#L32
Oh, you mean directly ajax http://npmsearch.com/
Sorry, I am thinking you want to setup an npmsearch server when you point me to the github repo of npmsearch.
Yes. that may work. Thanks for your suggestion
:smile:
Updated
Thank you so much! :tada:
No longer need to cache the module list in file