2011-08-13 88 views

回答

2

你可以從http://nodejs.org/
的的NodeJS配置,你需要記住的一點重要的是關於其配置文件app.js 其中包括端口號主機和其他設置 這些是設置爲我工作

 
backendSettings = { 
"scheme":"https/http ", 
"host":"Your website url", 
"port":49165, //port number 
'sslKeyPath': 'Path for key', 
'sslCertPath': 'path for SSL certificate', 
'sslCAPath': '', 
"resource":"/socket.io", 
"baseAuthPath": '/nodejs/', 
"publishUrl":"publish", 
"serviceKey":"", 
"backend":{ 
"port":443, 
"scheme": 'https/http', //whatever is your website scheme 
"host":"host name", 
"messagePath":"/nodejs/message/"}, 
"clientsCanWriteToChannels":false, 
"clientsCanWriteToClients":false, 
"extensions":"", 
"debug":false, 
"addUserToChannelUrl": 'user/channel/add/:channel/:uid', 
"publishMessageToContentChannelUrl": 'content/token/message', 
"transports":["websocket", 
"flashsocket", 
"htmlfile", 
"xhr-polling", 
"jsonp-polling"], 
"jsMinification":true, 
"jsEtag":true, 
"logLevel":1}; 

0

我發現瞭如何安裝在Linux發行版數的NodeJS導遊。我自己測試過它們,它們按預期工作。既然你運行CentOS,第一個鏈接可能是最有用的。

CentOS 7

Ubuntu 14

Ubuntu 16

相關問題