├─ TinyPNG
│ ├─ images # 图片存放文件夹
│ ├─ app.js # 上传压缩代码
# 克隆项目
git clone https://github.com/wangjiewangjie/utils.git
# 进入项目目录
cd utils
cd TinyPNG
# 安装依赖
npm install
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org
# 启动服务
node app