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

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"; 
    } 
} 
主站蜘蛛池模板: 东乡族自治县| 麟游县| 卫辉市| 思茅市| 玉林市| 修水县| 中西区| 雷州市| 正镶白旗| 麻栗坡县| 双城市| 阆中市| 盐山县| 麟游县| 武川县| 上饶市| 福泉市| 瓦房店市| 龙川县| 兴海县| 新邵县| 汾西县| 宜昌市| 石首市| 永兴县| 南漳县| 东宁县| 永春县| 崇仁县| 休宁县| 铁岭县| 文化| 东光县| 通化市| 台湾省| 开原市| 夏邑县| 临潭县| 阳东县| 长白| 资阳市|