After meteor bundle, node.js is “LISTENING” but not showing up at localhost

為{幸葍}努か 提交于 2019-12-11 02:52:52

问题


I'm bundling a meteor app and running the uncompressed tarball with node. I am not sure why the app doesn't seem to appear on localhost. Here is how I'm bundling:

$ meteor bundle app.tar.gz

Then I uncompress:

$ tar -zxvf app.tar.gz

Then I cd into the bundle directory and do as the README says:

$ rm -r programs/server/node_modules/fibers
$ npm install fibers@1.0.1
$ export MONGO_URL='mongodb://<dbuser>:<dbpassword>@<PORT>.mongolab.com:<PORT>/<db>'
$ export ROOT_URL='http://localhost:3000'
$ node main.js

Then, node says it is LISTENING but localhost:3000 doesn't connect.

I have node v0.10.22, and Meteor says bundle has only been tested with node v0.10.21, but it seems unlikely to be the problem. Am I doing something wrong?


回答1:


You also have to specify a PORT

export MONGO_URL='mongodb://<dbuser>:<dbpassword>@<PORT>.mongolab.com:<PORT>/<db>'
export ROOT_URL='http://localhost:3000'
export PORT=3000
node main.js


来源:https://stackoverflow.com/questions/20584916/after-meteor-bundle-node-js-is-listening-but-not-showing-up-at-localhost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!