MateusAndrade / use-cep-hook

Brazilian CEP info on a elegant way! :scream_cat: :mag: :mailbox:
23 stars 2 forks source link

You can use cep-promise #1

Closed lucianopf closed 4 years ago

lucianopf commented 4 years ago

Description

That's actually not an Issue, but rather an suggestion 😬

Right now your hook relies only at ViaCep to reply to it's user, and if there's any outage at ViaCep your hook simply wont work.

In order to solve this you might update your integration to use https://www.npmjs.com/package/cep-promise that will simplify all your logic and also provide integration with:

The module will fetch the data form all providers and return as soon as at least one of the services reply =)

MateusAndrade commented 4 years ago

Description

That's actually not an Issue, but rather an suggestion 😬

Right now your hook relies only at ViaCep to reply to it's user, and if there's any outage at ViaCep your hook simply wont work.

In order to solve this you might update your integration to use https://www.npmjs.com/package/cep-promise that will simplify all your logic and also provide integration with:

  • ViaCep
  • Correios
  • WideNet

The module will fetch the data form all providers and return as soon as at least one of the services reply =)

HEY @lucianopf , i don't know about this package. I will give a look and improve this with that. 💃 .

Btw thanks! 🙉 🙉 🙉

lucianopf commented 4 years ago

Awesome mate!!

If you need any help integrating with this lib please feel free to ask me! 😬

MateusAndrade commented 4 years ago

Thanks @lucianopf , i just published a new version using cep-promise. 🎉