deployd / docs

documentation for deployd
http://docs.deployd.com
29 stars 30 forks source link

refactor(module): ajax load dpd-module list from http://npm.dathub.org/ #46

Closed ericfong closed 8 years ago

ericfong commented 9 years ago

No longer need to cache the module list in file

NicolasRitouet commented 9 years ago

@ericfong It looks like this PR got a bit lost, is it still relevant? Should I merge it?

NicolasRitouet commented 9 years ago

Looks like dathub.org is down, any alternative?

ericfong commented 9 years ago

Mmm, hard to find npm repo mirror that allow Access-Control-Allow-Origin ...

cognitom commented 8 years ago

@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"
}
ericfong commented 8 years ago

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....

cognitom commented 8 years ago

@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

ericfong commented 8 years ago

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

cognitom commented 8 years ago

:smile:

ericfong commented 8 years ago

Updated

cognitom commented 8 years ago

Thank you so much! :tada: