Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
101 views
in Technique[技术] by (71.8m points)

"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?

Basically what is the difference between:

  • "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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

  1. creates a local database
  2. watches on every dependent file in your app or in your packages
  3. sends every file separately and unminified to the client (this is super inefficient unless you are developing locally)

In contrast, bundling an app:

  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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...