Meteor with cloud9

Deadly 提交于 2019-12-01 05:57:11

I just ran into similar issues initially, but the latest version of Meteor (0.9.0) makes this easy at least.

meteor run --port=$IP:$PORT

Seems to do the trick (at least so far)

This is doc'd in

meteor help run

hth

Andy

Ok, so actually the first part of the question is the correct answer, if I hadn't done it the other way around:

BIND_IP is used within meteor/packages/webapp/webapp_server.js, but not in meteor/tools/run-proxy.js. However both need to bind to cloud9's 'IP'-variable.

So to solve this issue, simply update the proxy, similar as I did it, to use the correct IP-address: self.server.listen(self.listenPort, process.env.IP, function () {

and just write in your .bashrc export BIND_IP=$IP

now everything works smoothly (provided, that you use a mongodb outside of cloud9)

I've summarised the necessary steps in my blog: http://peter.grman.at/how-to-run-meteor-in-cloud9/

meteor works very nice in c9.io, i am working in c9.io with metor. just following the steps.

  1. select workshop as nodejs.

  2. in terminal write the command "curl https://install.meteor.com/ | sh"

  3. in terminal write $ meteor create newapp(your main application folder name)

  4. in terminal write cd newapp

  5. in terminal write $ meteor -p 8080 (note -p or --port, if you using port as 300 that not working properly in c9.io . so you should using port as 8080 or 8081 or 8082)

  6. after few seconds you get a link app running at: localhost:8080

  7. click the link and open it.

Sphinxxx

Meteor 1.4:

At first, I tried a lot of different variations, with and without the --port flag mentioned in Andrew's answer.

  • If I only ran the meteor command without any flag, the app would successfully start on port 3000, but apparently that port can't be used in Cloud9 (https://docs.c9.io/docs/multiple-ports)

  • If I used the --port flag, meteor would just hang on "Starting your app"

Most likely something got stuck along the way (with all the retries), because what probably finally fixed it was to run a meteor reset before starting the app (Meteor application - Stuck at "Starting your app" when trying to run):

...$ sudo meteor reset
...$ sudo meteor --port=$IP:$PORT

If that doesn't help, I had also added some detailed logging on the attempt that finally worked (see this meteor forum post: Meteor stuck at starting your app). Try this if you're still stuck:

...$ sudo meteor reset
...$ METEOR_PROFILE=1
...$ METEOR_LOG=debug
...$ sudo meteor --port=$IP:$PORT --verbose

After it worked the first time, I can now start the app with only one command:

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