最近看到阿里百川 http://tae.taobao.com/ 可以免费创建Nodejs应用,上去玩了下创建初始化nodejs项目是没问题的,但把自己的代码部署上去就不行了,那怕只是一个简单的“ Hello world ” 都不行。
代码如下: var http = require(“http”); http.createServer(function(request, response) { console.log(“Request received…”); response.writeHead(200, {"Content-Type": "text/plain"}); response.write(“Hello world”); response.end(); }).listen(80);
访问时报的错如下: 502 Bad Gateway
The proxy server received an invalid response from an upstream server. Sorry for the inconvenience. Please report this message and include the following information to us. Thank you very much!
URL: http://ttv1.wx.jaeapp.com/ Server: jaenginx05.am100.aliyun.com Date: 2015/10/10 12:00:35
有谁知道原因?