简体   繁体   English

使用Meteor启用Gzip压缩

[英]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来查看(和修改)服务器文件。

[1] http://tomg.co/gzippo [1] http://tomg.co/gzippo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Heroku Cedar上为静态Rack站点启用gzip压缩? - How to enable gzip compression for static Rack sites on Heroku Cedar? 如何在Heroku Cedar上的Play Framework 1应用程序上启用GZIP压缩? - How to Enable GZIP compression on Play Framework 1 app on Heroku Cedar? 如何在Heroku Cedar上启用gzip压缩(Python / Flask / Gunicorn) - How to enable gzip compression on Heroku Cedar (Python/Flask/Gunicorn) django css和js文件在heroku上压缩gzip - django css and js files gzip compression on heroku 在Heroku压缩,gzip,过期标签中改进Grails应用 - Improve Grails App in Heroku compression, gzip, expire tags 如何配置 Heroku 以使用 gzip 压缩托管文件 - How to Configure Heroku to host files using gzip compression heroku上的资产的gzip压缩不适用于自定义域 - gzip compression of assets on heroku doesn't work with custom domain 如何在heroku上的PHP应用程序中启用压缩? - How to enable compression in a PHP app on heroku? 如何在http-kit上启用Gzip来缩小ClojureScript? - How to enable Gzip on http-kit for minified ClojureScript? 为什么我的 heroku 应用程序在使用 gzip 压缩后加载资源的时间过长? - Why is my heroku app loading resources too long even after using gzip compression?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM