A NodeJS implementation on creating addresses from a Bitcoin (zpub, xpub) address
I would suggest using a library such as the bitcoinjs-lib library.

Here's a very stripped down example usage:

let bitcoin = require("bitcoinjs-lib");

function fromXpub(xpub, acctNumber, keyindex, callback){
    let address = bitcoin.HDNode.fromBase58(xpub).derivePath(acctNumber+"/"+keyindex).getAddress(); 
    callback(address);
}

let myxpub = "xpub6C6RXXtdbxSnfB78Y4WjJSjQuChKqHXh9JCZPeKtdGeWRiptL9oJePPtrYKPWaoem9W3Wvp8eEh8dFFuN7u4zT6x6A1H6D67bVVvufv3uJ1";

fromXpub(myxpub, 0, 0, function(cb){
    console.log(cb);
});



  
    13eX3ohuXCa93YgLCkuQF6NmJk8vUwqa8p