[英]How can I execute functions in a node.js file hosted by Heroku from a file hosted in a different environment?
我目前使用主機風來托管 html/css/js 文件。 我需要將 Node 用於新的項目方面,host winds 說 id 必須使用虛擬專用服務器。 所以我認為不應該使用 Heroku,因為我已經有部署到該環境的經驗。
heroku 應用程序必須執行條帶操作:(虛擬數據)
const stripe = require('stripe')('sk_test_NOFBwvYmIyZln2c64bv84A');
stripe.oauth.token({
grant_type: 'authorization_code',
code: 'ac_123456789',
}).then(function(response) {
// asynchronously called
var connected_account_id = response.stripe_user_id;
});
然后是 firebase firestore 寫操作
如何從 Hostwinds 上托管的文件連接到 heroku 環境? 是否像在 node.js heroku 部署中創建一個快速服務器一樣簡單,並從主機 Winds 托管的網頁中調用一個 fetch POST/GET 到快速端點
是否像在 node.js heroku 部署中創建一個快速服務器一樣簡單,並從主機 Winds 托管的網頁中調用一個 fetch POST/GET 到快速端點
確切地說,在 heroku 服務器上調用應用程序中的路由之一,然后從那里運行您的函數。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.