我正尝试在digitalocean上部署我的node.js应用程序。当我像107.170.16.24:3000这样在ip上打开它时,它完美地打开了。
但是,当我在像theconnect.io这样的域名上打开它时。我明白了
This site can’t be reached
www.theconnect.io took too long to respond.我检查了名称服务器,这些看起来都没问题。谁能告诉我错误在哪里?即使我知道错误的来源,我也可以纠正它。但是,现在我很困惑,我应该在哪里寻找错误。
当我连接我的ubuntu终端并运行"nodemon“命令时。它可以完美地运行,并向我显示如下文本
root@nodejs-512mb-nyc2-01:~/poppop2# nodemon
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./bin/www`
in dir routes / index
moving to 404
onListening now
Db Connected因此,就app而言,看起来一切都运行得很好。有人能告诉我为什么我输入域名theconnect.io时打不开吗?
发布于 2017-05-01 20:33:08
我刚解决了这个问题。所以,我会在这里发布我的答案。我将port更改为80,它起作用了。此前,这个数字是3000。现在,它起作用了。谢谢
https://stackoverflow.com/questions/43718955
复制相似问题