“流星"对比“流星束"用于生产 [英] "meteor" vs "meteor bundle" for production
问题描述
在生产中,为什么我应该捆绑"流星应用程序,而不仅仅是复制 服务器上的源使用流星"命令?
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:
- 创建本地数据库
- 监视应用程序或软件包中的每个相关文件
- 将每个文件分别发送给客户端,并且不会最小化(除非您在本地进行开发,否则效率极低)
相反,捆绑一个应用程序:
In contrast, bundling an app:
- does not create a local database
- does not spend CPU watching your files for changes
- 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屋!