Code Monkey home page Code Monkey logo

Comments (5)

pvela avatar pvela commented on July 28, 2024

Technically it doesn't have to be a singleton. I will plan on changing this in a future release. In the mean time below is the workaround for you to try.

var nexmo = require('EASYNEXMO');
var enexmo = require('easynexmo');
var dnexmo = require('EASYnexmo');
nexmo.initialize("key1","secret1",true);
enexmo.initialize("key2","secret2",true);
dnexmo.initialize("key3","secret3",true);

I dont personally like this but something to get you going while I get this change done.

from vonage-node-sdk.

wertlex avatar wertlex commented on July 28, 2024

@pvela any help required?

from vonage-node-sdk.

leggetter avatar leggetter commented on July 28, 2024

@pvela @wertlex - I've experimented in a branch that does a few things:

  1. Moves to ES2015 and uses Babel transpilation
  2. Moves towards a non-singleton API, but still uses the singleton within the Nexmo instance for now
  3. Makes a start towards having functions live on related namespaces as per Must be namespaced by concept in the WiP (work in progress) library spec https://github.com/Nexmo/client-library-specification/blob/master/SPECIFICATION.md#api-methods

Any thoughts on this? e.g.

  • Are we okay moving to ES2015?
  • Do we think taking an incremental approach to non singltons is a good approach? Will it avoid a big bang and thus big changes?

Edit: Here's the branch https://github.com/Nexmo/nexmo-node/tree/namespaces

from vonage-node-sdk.

pvela avatar pvela commented on July 28, 2024

I am ok to move to ES2015. Thats the future 👍 .
I started doing a big bang approach in the old repo, but didn't make much progress. Having thought about it and made some initial design I can say for sure that its a good idea to take an incremental approach.

from vonage-node-sdk.

leggetter avatar leggetter commented on July 28, 2024

We are moving away from the singleton approach. Closing this question as answered.

from vonage-node-sdk.

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.