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

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"; 
    } 
} 
主站蜘蛛池模板: 罗城| 同江市| 西昌市| 贵州省| 电白县| 白城市| 阿克苏市| 青岛市| 黄大仙区| 延边| 承德县| 郑州市| 万山特区| 寿阳县| 襄城县| 自贡市| 壤塘县| 玛曲县| 黄骅市| 囊谦县| 郓城县| 上饶县| 新泰市| 隆昌县| 咸阳市| 和田市| 盈江县| 武隆县| 云阳县| 上栗县| 拜泉县| 荔波县| 湛江市| 吉首市| 长丰县| 乐东| 紫金县| 沙河市| 西畴县| 曲阜市| 磐石市|