简体   繁体   中英

Access webhook variables in front end

I'm developing the front-end and back-end of a web application using emberjs, now I have some data in webhooks.js in the back-end that I need to process in the front-end, the front-end javascript file is located in a handlebar(.hbs) under templates folder.

My question is, what's the best way to access a back-end variable in the front-end javascript?

For example, I use router.post to retrieve some data from the Stripe endpoint, then I want to send the data to my front-end, so I can do something to that data in the javascript.

您将向Stripe API发出请求以获取一些信息(例如, 检索Charge ),然后使用model-hook将这些信息代理到前端。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM