Coldfusion 如何从共享node.js服务器向世界问好

Coldfusion 如何从共享node.js服务器向世界问好,coldfusion,Coldfusion,大家好,我的ColdFusion开发人员同事们 我正在尝试学习node.js,我在上有一个免费的沙盒帐户。 如果我查看API访问,他们会给出可访问的html代码: <!DOCTYPE html> <head> <title>Pusher Test</title> <script src="http://js.pusherapp.com/1.9/pusher.min.js" type="text/javascript"></

大家好,我的ColdFusion开发人员同事们

我正在尝试学习node.js,我在上有一个免费的沙盒帐户。 如果我查看API访问,他们会给出可访问的html代码:

<!DOCTYPE html>
<head>
  <title>Pusher Test</title>
  <script src="http://js.pusherapp.com/1.9/pusher.min.js" type="text/javascript"></script>
  <script type="text/javascript">
    // Enable pusher logging - don't include this in production
    Pusher.log = function(message) {
      if (window.console && window.console.log) window.console.log(message);
    };

    // Flash fallback logging - don't include this in production
    WEB_SOCKET_DEBUG = true;

    var pusher = new Pusher('0xxxx0xxxxxxxxxxxx00');
    var channel = pusher.subscribe('test_channel');
    channel.bind('my_event', function(data) {
      alert(data);
    });
  </script>
</head>
但我想我没有卷发


问:我可以改用cfhttp吗?

我不知道这里发生了什么。NodeJS不是您的web浏览器。我看不出NodeJS与这些有什么关系

我以前从未使用过pusher或coldfusion,但我相信您可以使用coldfusion向“pusher”发送简单的HTTP请求,就像curl一样。HTTP请求一点也不复杂,curl是一个发送和接收HTTP请求的简单命令行程序


curl命令只是打开这个长URL作为POST请求,并发送“helloworld”作为主体,而“helloworld”应该出现在您的web浏览器中

是的,简而言之。尽管如此,为什么要使用CF,因为您希望使用node?当然,除非您在Windows上运行node:$嗯,我仍然在尝试让Hello World正常工作,所以我确信我做了一些错误的事情(比如使用ColdFusion)。我就是不明白。我在一个充满电脑的教室里教学,我想让我的学生有一个互动的体验,每个人都在不断更新(事件)。我只是想按照指示让Hello World开始工作。是的,我是一个视窗人。啊!非常有趣。尝试您可以有一个主服务器,让所有学生在浏览器中包含socket.io,并让每个人使用您定义的聊天协议实现自己的聊天系统。我想不需要太多。如果您正在寻求帮助,请向我发送电子邮件/信息。我很乐意给出一些建议。
curl -d "hello world" \
"http://api.pusherapp.com/apps/7499/channels/test_channel/events?"\
"name=my_event&"\
"body_md5=xxxxxxxxxxxxxxxxx&"\
"auth_version=1.0&"\
"auth_key=0xxxxxxxxxxxxxxx00&"\
"auth_timestamp=1318305150&"\
"auth_signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"