bst icon indicating copy to clipboard operation
bst copied to clipboard

BSTProxy - Allow access to bst sourceID in callback

Open eemmzz opened this issue 6 years ago • 1 comments

Is your feature request related to a problem? Please describe.

We have a npm script which creates a local dynamo instance and a lambda proxy at the same time. We use this class http://docs.bespoken.io/en/latest/api/classes/bstproxy.html to create the bespoken proxy. The issue I am finding is I no longer get the output showing your bespoken URL without having to read the ~/.bst/config file which isn't ideal. I'd like to be able to output more information for other developers to the terminal.

Describe the solution you'd like

I would like to be able to access the information in the callback...

return BSTProxy.lambda('index.js').start((config) =>
    console.info(config) // now have access to items in ~/.bst/config 
);

For example - but I am not too choosey as long as I have the sourceID.

I want to be able to replicate the message of:

    Your public URL for accessing your local service:
    https://random-name.bespoken.link

That you get when using bst proxy lambda index.js

Describe alternatives you've considered

The only other alternative I can do right now is manually read in the ~/.bst/config file. If there is already another way of getting this information as it stands that would be great though. I have tried reading the docs and the source code and cannot find anything though.

Additional context

None.

eemmzz avatar Sep 14 '18 16:09 eemmzz

Hello @eemmzz , thanks a lot for your interest in our products and for this feature request. I'm going to pass this to our Product Team to be reviewed. We'll get back to you as soon as possible 👍

Have a great day!

​Iván Pérez Customer Success Bespoken w: | bespoken.io e: [email protected]

ig-perez avatar Sep 14 '18 16:09 ig-perez