Skip to content
Lucky Snail Logo Lucky Snail
中文

Coding Experience Post

/ 1 min read /
#经验
Table of Contents 目录

1. Quickly find the globally installed npm package path

Terminal window
npm root -g
# cd to the output directory, then enter
open .

2. Find the PID of a specified port and kill it

Terminal window
ss -tulpn | grep xxxx
kill PID

3. Unsafe default backend return values, handle exceptions