如何给Nginx 添加 rtmp 模块

1.首先 nginx -V 得到当前 nginx 的编译参数

root@vultr:/usr/local/nginx/sbin# ./nginx -V
nginx version: nginx/1.19.4
built by gcc 8.3.0 (Debian 8.3.0-6)
built with OpenSSL 1.1.1d 10 Sep 2019
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx-1.9.3 --with-openssl=/usr/local/src/openssl-1.0.2 --with-pcre=/usr/local/src/pcre-8.37 --with-zlib=/usr/local/src/zlib-1.2.8 --with-http_ssl_module --with-http_ssl_module //当前nginx 的配置参数

2.备份当前nginx的可执行文件

继续阅读“如何给Nginx 添加 rtmp 模块”

「Vue」基于环境配置webpack打包参数

vue.config.js

module.exports = {
...
    configureWebpack: config => {
        if (process.env.NODE_ENV === 'production') {
            // 为生产环境修改配置...
        } else {
            // 为开发环境修改配置...
            config.resolve.alias={
                '@': path.resolve(__dirname, 'src')//配置路径别名 import xxx from '@/'
            }
        }
    },
}

JS setter getter

let obj = {
    _name: null,
    get name() {
        return this._name
    },
    set name(name) {
        if (typeof name !== 'string') {
            return console.log('赋值类型必须为 String')
        } else {
            this._name = name
        }
    }
}
JS setter getter插图