GithubHelp home page GithubHelp logo

Comments (4)

lkaric avatar lkaric commented on June 10, 2024

What do you mean by not having the accountSid and authToken from the start, can you elaborate on why and how you pull the credentials and why that is "delayed?

from nestjs-twilio.

r37r0m0d3l avatar r37r0m0d3l commented on June 10, 2024

In short - application is a microservice. It's starts right away, but receive some configuration when other microservice is started. No, there is no other hacky way to do it, if you want to ask that. Even worse, I have v1.2.0, so I don't think pull request for v3.0.0 from me will help much. Another way is somehow disable module (Twilio client initialization), and then restart whole aplication when credentials is received.

from nestjs-twilio.

lkaric avatar lkaric commented on June 10, 2024

Not out of the box, I'd recommend taking a look at async providers here and/or, perhaps, lazy loading modules here. The whole package is a wrapper around the twilio SDK, and this sounds like it could be a more nest-related question. I'd be happy to try and debug if you were to provide a minimal reproduction.

The async providers could be the way to go in the case of wanting to delay the module registration.

from nestjs-twilio.

r37r0m0d3l avatar r37r0m0d3l commented on June 10, 2024

I just forked version 3 and did a very neat hack for lazy client initialization with a boolean flag that client is initialized. I'm closing issue.

from nestjs-twilio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.