官术网_书友最值得收藏!

How to do it...

As Meteor has an inbuilt server, we need to ensure this is running first:

meteor run

This will start the Meteor proxy, start MongoDB, and then build the application. By default, it'll listen on port 3000 of your localhost. For a production system, you'll want to implement a proper init script to start this when the server boots. Third-party packages such as Meteor-Up can make this easy to do.

Like the previous recipes, we're using a separate NGINX server configuration file, for example, /etc/nginx/conf.d/meteor.conf:

server { 
    listen       80; 
    server_name  meteorapp.nginxcookbook.com; 
 
    access_log  /var/log/nginx/meteor-access.log  combined; 
 
    location / { 
         proxy_pass http://127.0.0.1:3000; 
         proxy_http_version 1.1; 
         proxy_set_header Upgrade $http_upgrade; 
         proxy_set_header Connection "upgrade"; 
    } 
} 
主站蜘蛛池模板: 宁城县| 嵩明县| 苏尼特左旗| 安多县| 深圳市| 南投县| 嘉善县| 巫山县| 独山县| 武威市| 嫩江县| 长春市| 荆州市| 甘谷县| 东方市| 通许县| 连城县| 邵阳县| 河池市| 太仓市| 松溪县| 正蓝旗| 阿尔山市| 九江市| 新闻| 安康市| 仁化县| 都兰县| 全南县| 宁乡县| 大丰市| 馆陶县| 富蕴县| 平阴县| 车险| 清水河县| 宁安市| 都江堰市| 桂平市| 区。| 长阳|