Field Notes
Engineering

Common Dev Commands

Zip exclusions, PM2 startup, and systemd in WSL2.

1 min read

  1. Compress files (excluding folders)
bash
zip -r folder.zip ./folder -x "./folder/sub_folder1" "./folder/sub_folder2"

2, pm2 start

bash
NODE_ENV=prod pm2 start index.js --name xxx
  1. pm2 set auto startup
pm2 save
pm2 startup
  1. WSL2: enable systemd (needed for Docker)

Edit /etc/wsl.conf:

[boot]
systemd=true