【问题标题】:why alexa endpoints not listen to my server with 4000 port为什么 alexa 端点不使用 4000 端口监听我的服务器
【发布时间】:2019-09-10 04:17:26
【问题描述】:

你好,我是 alexa 技能开发的新手。当我将我的服务器 url 添加到 alexa 端点时,它在 4000 端口上侦听并测试它。它无法与端点通信。尽管如此,当我通过 url 向浏览器发出获取请求时,它完美地向我发送响应。

我已尝试将此网址添加到端点。 https://myprojecturl:4000

app.get('/', function (req, res) {
 console.log(uuid);
 res.status(200).send('Done during the request');
 });

   app.post('/', function (req, res) {
 console.log("in post")
   if (!skill) {
skill = Alexa.SkillBuilders.custom()
  .addRequestHandlers(handlers[0], handlers[1], handlers[2], handlers[3], handlers[4], handlers[5], handlers[6], handlers[7], handlers[8], handlers[9], handlers[10], handlers[11], handlers[12])
  .create();
}

这是我的 server.js 文件中的 get 和 post 方法,它使用 express.post 方法调用所有由 index.js 文件导出的处理程序

ps:使用 localhost 和 ngrok 一切都运行良好。但是使用服务器 url 产生问题

帮助我与 alexa 技能和我的服务器 url 建立通信

【问题讨论】:

    标签: https alexa alexa-skills-kit alexa-skill


    【解决方案1】:

    端口需要在 443 中。根据我的经验,它不适用于其他端口。

    【讨论】:

    • 谢谢你,我认为你的回答是正确的。请我的前辈给我443端口的访问权限,然后我会测试并告诉你。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-07
    • 1970-01-01
    • 2021-02-04
    相关资源
    最近更新 更多