f
This commit is contained in:
34
.gitignore
vendored
34
.gitignore
vendored
@ -15,4 +15,36 @@ target/
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
#.idea/git
|
||||
|
||||
|
||||
**/.DS_Store
|
||||
**/node_modules
|
||||
**/dist
|
||||
**/dist.zip
|
||||
**/docker/dist
|
||||
|
||||
|
||||
# local env files
|
||||
**/.env.local
|
||||
**/.env.*.local
|
||||
|
||||
# Log files
|
||||
**/npm-debug.log*
|
||||
**/yarn-debug.log*
|
||||
**/yarn-error.log*
|
||||
**/pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
**/.idea
|
||||
**/.vscode
|
||||
**/*.suo
|
||||
**/*.ntvs*
|
||||
**/*.njsproj
|
||||
**/*.sln
|
||||
**/*.sw?
|
||||
|
||||
# lock
|
||||
**/package-lock.json
|
||||
**/yarn.lock
|
||||
**/pnpm-lock.yaml
|
||||
|
||||
2
frontend/.env
Normal file
2
frontend/.env
Normal file
@ -0,0 +1,2 @@
|
||||
PORT=3001
|
||||
REACT_APP_API_URL=http://localhost:8080
|
||||
7
frontend/.env.development
Normal file
7
frontend/.env.development
Normal file
@ -0,0 +1,7 @@
|
||||
# 开发环境配置
|
||||
PORT=3001
|
||||
REACT_APP_ENV=development
|
||||
REACT_APP_API_URL=http://localhost:8080
|
||||
REACT_APP_API_TIMEOUT=10000
|
||||
REACT_APP_DEBUG=true
|
||||
GENERATE_SOURCEMAP=true
|
||||
7
frontend/.env.production
Normal file
7
frontend/.env.production
Normal file
@ -0,0 +1,7 @@
|
||||
# 生产环境配置
|
||||
REACT_APP_ENV=production
|
||||
REACT_APP_API_URL=https://api.yourdomain.com
|
||||
REACT_APP_API_TIMEOUT=30000
|
||||
REACT_APP_DEBUG=false
|
||||
GENERATE_SOURCEMAP=false
|
||||
INLINE_RUNTIME_CHUNK=false
|
||||
6
frontend/.env.test
Normal file
6
frontend/.env.test
Normal file
@ -0,0 +1,6 @@
|
||||
# 测试环境配置
|
||||
REACT_APP_ENV=test
|
||||
REACT_APP_API_URL=http://localhost:8080
|
||||
REACT_APP_API_TIMEOUT=15000
|
||||
REACT_APP_DEBUG=true
|
||||
GENERATE_SOURCEMAP=true
|
||||
28
frontend/package-lock.json
generated
28
frontend/package-lock.json
generated
@ -26,6 +26,9 @@
|
||||
"react-scripts": "5.0.1",
|
||||
"typescript": "^4.9.5",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"env-cmd": "^10.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@adobe/css-tools": {
|
||||
@ -6850,6 +6853,31 @@
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/env-cmd": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/env-cmd/-/env-cmd-10.1.0.tgz",
|
||||
"integrity": "sha512-mMdWTT9XKN7yNth/6N6g2GuKuJTsKMDHlQFUDacb/heQRRWOTIZ42t1rMHnQu4jYxU1ajdTeJM+9eEETlqToMA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"commander": "^4.0.0",
|
||||
"cross-spawn": "^7.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"env-cmd": "bin/env-cmd.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/env-cmd/node_modules/commander": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/commander/-/commander-4.1.1.tgz",
|
||||
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/error-ex": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz",
|
||||
|
||||
@ -22,9 +22,18 @@
|
||||
"typescript": "^4.9.5",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"env-cmd": "^10.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"start:dev": "env-cmd -f .env.development react-scripts start",
|
||||
"start:prod": "env-cmd -f .env.production react-scripts start",
|
||||
"start:test": "env-cmd -f .env.test react-scripts start",
|
||||
"build": "env-cmd -f .env.production react-scripts build",
|
||||
"build:dev": "env-cmd -f .env.development react-scripts build",
|
||||
"build:prod": "env-cmd -f .env.production react-scripts build",
|
||||
"build:test": "env-cmd -f .env.test react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user