部署 Meteor 时的环境变量
除了PORT
、MONGO_URL
,我们在哪里可以找到Meteor暴露的所有环境变量的文档?
Other than PORT
, MONGO_URL
, where can we find the documentation for all the environmental variables that's exposed by Meteor?
在 Meteor 文档中,我只能找到这一行
In the Meteor docs, I can only find this line
PORT=3000 MONGO_URL=mongodb://localhost:27017/myapp node bundle/main.js
是否有一个变量可以组合所有 JS 文件并缩小它们?
Is there a variable that combines all the JS files and minifies them?
我一直在使用 grasp 来回答您的问题问题.这是我使用的命令行:
I've been using grasp to answer your question. Here is the command line I used:
grasp -reo --no-line-number --no-color --no-filename process.env.__ . 2> /dev/null | sort | uniq | cut -c 17-
这是在 devel 分支上的结果:
And here is the result on the devel branch:
_
ADMIN_APP
APP_CONFIG
APPDATA
AUTOUPDATE_VERSION
BIND_IP
COMP_CWORD
COMP_LINE
COMP_POINT
COMPUTERNAME
ComSpec
DDP_DEFAULT_CONNECTION_URL
DEBUG
DEBUG_MIME
DEBUG_NOPT
DESTDIR
DISABLE_WEBSOCKETS
EDITOR
GALAXY
GALAXY_APP
GALAXY_JOB
HOME
HOSTNAME
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
JOBS
LAST_START
MAIL_URL
MAKE
METEOR_SETTINGS
MONGO_URL
NODE_BINDINGS_ARROW
NODE_BINDINGS_COMPILED_DIR
NODE_DEBUG
NODE_ENV
NODE_NDEBUG
NOPT_DEBUG
npm_config_proxy
path
Path
PATH
PATHEXT
PORT
PREFIX
PROMPT
PS1
PWD
PYTHON
ROOT_URL
ROUTE
SERVER_ID
SHELL
SUDO_GID
SUDO_UID
SystemDrive
TEMP
TMP
TMPDIR
ULTRAWORLD_DDP_ENDPOINT
USE_JSESSIONID
USER
USERDOMAIN
USERNAME
USERPROFILE
VISUAL
windir
大多数环境变量尚未记录.
Most of thoses environment variables are not documented yet.
关于缩小所有 js 和 css 文件,您可以使用 --production
参数:
About minifing all js and css files, you can use the --production
parameter:
meteor run --production
要获取文档,请使用 --help
参数:
To get the documentation use the --help
parameter:
meteor run --help