anywhere
anywhere --help // print help information
anywhere // 8000 as default port, current folder as root
anywhere 8888 // 8888 as port
anywhere -p 8989 // 8989 as port
anywhere -s // don't open browser
anywhere -h localhost // localhost as hostname
anywhere -d /home // /home as root
anywhere -f /index.html // Enable html5 history,the index is /index.html
anywhere --proxy http://localhost:7000/api // Support shorthand URL, webpack.config.js or customize config file
asar加密解密
打包
asar pack ./app app.asar
解包
asar extract app.asar ./app
mac移动硬盘不能识别,查看硬盘列表-挂载硬盘,如果挂载超时,终止后台的fsck进程,重新挂载
硬盘列表
diskutil list
# mount命令可以只挂载硬盘的某个分区
diskutil mount /dev/disk2s2
# mountdisk命令可以实现挂载整个硬盘(包括所有分区)
diskutil mountdisk /dev/disk2
为什么会提示等待超时呢?其实是因为你把硬盘的数据线重新接上电脑时,系统检测到硬盘异常,Mac 系统会在“后台自动运行” 磁盘修复进程: fsck,从而导致 diskutil mount 命令运行超时。
终止后台自动执行的“磁盘修复进程”
先执行下面命令,找到后台运行的 fsck 进程的PID:
ps aux | grep fsck
sudo pkill -f fsck
或
sudo kill -9 21364
diskutil mountdisk /dev/disk2