2015-10-19 81 views
0

我試圖得到這個節點的工作一小段代碼:如何快速收聽外部連接?

#!/usr/bin/env node 
var debug = require('debug')('server_auth'); 
var app = require('../app'); 

app.set('port', process.env.PORT || 3000); 

var server = app.listen(app.get('port'), function() { 
debug('Express server listening on port ' + server.address().port); 
}); 

是從波迪奧API節點: https://github.com/podio/podio-js/blob/master/examples/server_auth/bin/www

的一點是,我得到這個從本地主機去,並能拿起它,但我不知道如何讓外部程序快速響應。

回答

0

如果您的防火牆中有該端口,則在您的端口3000上打開,您可以使用網絡中的任何其他計算機,並針對IP:3000和您想要到達的路由進行呼叫。