- Created package.json for managing workspaces (frontend and backend) - Added scripts for development, build, testing, and Docker operations - Implemented kill-dev-processes.sh script to terminate development processes gracefully
44 lines
1.8 KiB
JSON
44 lines
1.8 KiB
JSON
{
|
|
"name": "fullstack-typescript-template",
|
|
"version": "1.0.0",
|
|
"description": "Full Stack TypeScript Template with React Frontend and Express Backend",
|
|
"private": true,
|
|
"workspaces": [
|
|
"backend",
|
|
"frontend"
|
|
],
|
|
"scripts": {
|
|
"install:all": "npm install && npm install --workspace backend && npm install --workspace frontend",
|
|
"dev": "concurrently \"npm run dev:backend\" \"npm run dev:frontend\"",
|
|
"dev:backend": "npm run dev --workspace backend",
|
|
"dev:frontend": "npm run start --workspace frontend",
|
|
"build": "npm run build --workspace backend && npm run build --workspace frontend",
|
|
"build:backend": "npm run build --workspace backend",
|
|
"build:frontend": "npm run build --workspace frontend",
|
|
"test": "npm run test --workspace backend && npm run test --workspace frontend",
|
|
"test:backend": "npm run test --workspace backend",
|
|
"test:frontend": "npm run test --workspace frontend",
|
|
"clean": "rm -rf node_modules backend/node_modules frontend/node_modules backend/dist frontend/build",
|
|
"clean:build": "rm -rf backend/dist frontend/build",
|
|
"docker:build": "docker build -t fullstack-app .",
|
|
"docker:up": "docker-compose up -d",
|
|
"docker:down": "docker-compose down",
|
|
"docker:stop": "docker-compose stop",
|
|
"docker:restart": "docker-compose restart",
|
|
"docker:logs": "docker-compose logs -f",
|
|
"docker:logs:app": "docker-compose logs -f app",
|
|
"docker:logs:db": "docker-compose logs -f postgres",
|
|
"docker:clean": "docker-compose down -v --remove-orphans && docker system prune -f",
|
|
"docker:dev": "docker-compose up --build",
|
|
"docker:prod": "NODE_ENV=production docker-compose up -d --build",
|
|
"kill:dev": "./scripts/kill-dev-processes.sh"
|
|
},
|
|
"devDependencies": {
|
|
"concurrently": "^8.2.2"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0",
|
|
"npm": ">=9.0.0"
|
|
}
|
|
}
|