“流星"对比“流星束"用于生产 [英] "meteor" vs "meteor bundle" for production

查看:60
本文介绍了“流星"对比“流星束"用于生产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在生产中,为什么我应该捆绑"流星应用程序,而不仅仅是复制 服务器上的源使用流星"命令?

For production why should I "bundle" the meteor application and not just copy the sources on the server use the "meteor" command?

基本上有什么区别:

  • 流星束app.tar.gz",然后安装正确版本的Fiber和Node.js 并提取档案,然后从"node main.js"应用开始

  • "meteor bundle app.tar.gz", then installing the right version of fibers and nodejs and extracting the archive and starting with "node main.js" the app,

并复制服务器上的项目源,然后仅编写流星"即可开始 该应用程序?

and copying the project sources on the server and just writing "meteor" to start the app?

推荐答案

这不是详尽的列表,但是meteor命令可以执行以下操作:

This won't be an exhaustive list, but here are some things that the meteor command does:

  1. 创建本地数据库
  2. 监视应用程序或软件包中的每个相关文件
  3. 将每个文件分别发送给客户端,并且不会最小化(除非您在本地进行开发,否则效率极低)

相反,捆绑一个应用程序:

In contrast, bundling an app:

  1. 不创建本地数据库
  2. 不花费CPU来监视文件中的更改
  3. 创建两个缩小的文件(js和css),非常适合放在CDN上或通过
  1. does not create a local database
  2. does not spend CPU watching your files for changes
  3. creates two minified files (js and css) which is perfect for putting on a CDN or hosting from a reverse proxy. These are also efficient for clients to download and are highly cacheable.

通常,如果您使用一组很好的

In general, deploying shouldn't be a huge pain if you use a good set of scripts.

这篇关于“流星"对比“流星束"用于生产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆