[英]Enable Gzip Compression with Meteor
Is there a generic way to enable gzip compression when using Meteor irrespective of whether it is hosted locally, on meteor.com or on heroku? 使用Meteor时是否有通用的方法来启用gzip压缩,无论它是在本地,meteor.com还是在heroku上托管? If I wanted gzip compression just on my heroku-hosted Meteor app, how could that be enabled? 如果我想在我的heroku托管的Meteor应用程序上进行gzip压缩,那该怎么办呢?
Gzip compression does not appear to be used when running Meteor locally. 在本地运行Meteor时似乎没有使用Gzip压缩。
When you perform a meteor bundle
command, the resulting bundle contains a server which uses the 'gzippo' connect middleware [1] to perform gzip compression by default. 当您执行meteor bundle
命令时,生成的bundle包含一个服务器,该服务器默认使用'gzippo'连接中间件[1]来执行gzip压缩。
You can view (and modify) the server file by unpacking the tarball and editing: server/server.js. 您可以通过解压缩tarball并编辑:server / server.js来查看(和修改)服务器文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.