File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ PORT=61234
2+ HTTPS=true
3+ REACT_APP_BACKEND_SPECIFIC_API="https://alpha.opensist.tech/"
Original file line number Diff line number Diff line change 1+ PORT=61234
2+ HTTPS=true
Original file line number Diff line number Diff line change 4848 "zod" : " 3.22.4"
4949 },
5050 "scripts" : {
51- "start_win" : " set PORT=61234 && react-scripts start" ,
52- "start_unix" : " export PORT=61234 HTTPS=true && react-scripts start" ,
53- "build" : " CI=false react-scripts build" ,
54- "test" : " react-scripts test" ,
55- "eject" : " 臭小子别乱碰这个 react-scripts eject"
51+ "start:alpha" : " dotenv -e env/alpha -- react-scripts start" ,
52+ "start:beta" : " dotenv -e env/beta -- react-scripts start" ,
53+ "build" : " CI=false react-scripts build"
5654 },
5755 "eslintConfig" : {
5856 "extends" : [
7472 },
7573 "devDependencies" : {
7674 "@babel/plugin-proposal-private-property-in-object" : " 7.21.0" ,
75+ "dotenv-cli" : " ^8.0.0" ,
7776 "webpack" : " 5.94.0"
7877 }
7978}
Original file line number Diff line number Diff line change 1- const ROOT = "https://opensist.tech/" ;
1+ const defaultRoot = "https://opensist.tech/" ;
2+ const ROOT = process . env . REACT_APP_BACKEND_SPECIFIC_API ?. trim ( ) || defaultRoot ;
3+ if ( ROOT !== defaultRoot ) {
4+ console . log ( "Using Alpha API: " + ROOT ) ;
5+ }
6+
27export const PROGRAM_LIST = ROOT + "api/list/programs" ;
38export const PROGRAM_DESC = ROOT + "api/query/program_description" ;
49export const ADD_MODIFY_PROGRAM = ROOT + "api/mutating/new_modify_program" ;
You can’t perform that action at this time.
0 commit comments