nodejs安装reverse-sourcemap 后对map文件进行逆向(css也是同样操作)
npm install --global reverse-sourcemap
npm install typescript@latest
reverse-sourcemap --output-dir src app.xxxxx.js.map #逆向JS
reverse-sourcemap --output-dir src app.xxxxx.css.map #逆向CSS
取得TypeScript的ts文件后用tsc命令转换JavaScript获得js文件
tsc xxx.ts
最后会得到一个xxx.js的文件
安装
yum install nodejs git -y
npm install forever -g
npm install yarn -g
yarn global add pm2
mkdir /app/
cd /app/
git clone https://github.com/umami-software/umami.git
cd umami
yarn install
cat>.env<<EOF
DATABASE_URL=mysql://root:password@localhost:3306/umami
BASE_PATH = /analytics
EOF
yarn build
yarn start
pm2 start yarn --name umami -- start
pm2 startup
pm2 save
升级
cd /app/umami
#拉取仓库
git pull
#安装
yarn install
#构建项目
yarn build
#更新数据库
yarn update-db
pm2 restart umami
nginx反向代理配置
location /analytics {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}