Add npm run start-server-watch-dev for watching server code changes and restart (Node.js 19 only)

This commit is contained in:
Louis Lam 2022-10-29 23:37:05 +08:00
parent 54efde8185
commit 2ea71839d1

View file

@ -20,8 +20,9 @@
"dev": "concurrently -k -r \"wait-on tcp:3000 && npm run start-server-dev \" \"npm run start-frontend-dev\"",
"start-frontend-dev": "cross-env NODE_ENV=development vite --host --config ./config/vite.config.js",
"start": "npm run start-server",
"start-server": "node server/server.js",
"start-server": "node --watch server/server.js",
"start-server-dev": "cross-env NODE_ENV=development node server/server.js",
"start-server-watch-dev": "cross-env NODE_ENV=development node --watch server/server.js",
"build": "vite build --config ./config/vite.config.js",
"test": "node test/prepare-test-server.js && npm run jest-backend",
"test-with-build": "npm run build && npm test",