How to control where Meteor runs

后端 未结 4 1646
离开以前
离开以前 2021-02-01 09:21

I\'m installing Meteor (framework) on my AWS EC2 (micro) instance and followed the instructions and after creating a test project I ran meteor on that directory giv

4条回答
  •  轮回少年
    2021-02-01 10:04

    You can setup nginx to proxy port 3000 to your domain. Something like:

    server {
      listen 80;
      server_name meteortest.mydomain.com;
      access_log /var/log/nginx/meteortest.access.log;
      error_log /var/log/nginx/tmeteortest.error.log;
      location / {
        proxy_pass http://localhost:3000;
        include /etc/nginx/proxy_params;
      }
    }
    

    Please see http://wiki.nginx.org/HttpProxyModule for more information.

    However, running meteor on port 3000 is a development environment. If you want to use it in production, please run "meteor bundle", and then follow the README inside the generated tarball.

提交回复
热议问题