Skip to main content

PM2 配置文件介绍

· One min read
Alan
Maintainer of the Blog

容器内使用 pm2-runtime

示例

ecosystem.config.js
/**
* PM2 使用
* https://pm2.keymetrics.io/docs/usage/application-declaration/
*/
module.exports = {
apps: [{
name: "SPA_Application",
cwd: `${ROOT_DIR}/build`,
script: "serve",
instances: 1,
args: "",
env: {
PM2_SERVE_PORT: 8080,
PM2_SERVE_SPA: "true",
PM2_SERVE_PATH: ".",
PM2_SERVE_HOMEPAGE: './index.html'
},
env_production: {
},
env_development: {
},
max_restarts: 5,
restart_delay: 300_000,
out_file: "spa.log"
}]
}

Caching Tutorial for Web Authors and Webmasters

· 33 min read
Mark Nottingham

原文 Caching Tutorial for Web Authors and Webmasters

This is an informational document. Although technical in nature, it attempts to make the concepts involved understandable and applicable in real-world situations. Because of this, some aspects of the material are simplified or omitted, for the sake of clarity. If you are interested in the minutia of the subject, please explore the References and Further Information at the end.