File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 "dev" : " concurrently \" vite --host 0.0.0.0\" \" node server.js\" " ,
88 "build" : " vite build" ,
99 "start" : " IS_PRODUCTION=true node server.js" ,
10+ "start:prod" : " IS_PRODUCTION=true node server.js" ,
1011 "preview" : " npm run build && npm run start"
1112 },
1213 "dependencies" : {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export function TaskPanelMount() {
1515
1616 useEffect ( ( ) => {
1717 let active = true ;
18- fetch ( '/api/task' )
18+ fetch ( '. /api/task' )
1919 . then ( ( response ) => {
2020 if ( ! response . ok ) throw new Error ( `task fetch failed: ${ response . status } ` ) ;
2121 return response . json ( ) ;
@@ -48,7 +48,7 @@ export function TaskPanelMount() {
4848 config : data . task ,
4949 initialAnswer : data . submittedAnswer ,
5050 onChange : ( answer ) => {
51- fetch ( '/api/task/answer' , {
51+ fetch ( '. /api/task/answer' , {
5252 method : 'POST' ,
5353 headers : { 'Content-Type' : 'application/json' } ,
5454 body : JSON . stringify ( { answer } ) ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ let apiAvailable: boolean | null = null;
77
88export async function fetchConfig ( ) : Promise < GeometryState > {
99 try {
10- const response = await fetch ( '/api/config' ) ;
10+ const response = await fetch ( '. /api/config' ) ;
1111 if ( response . status === 404 ) {
1212 apiAvailable = false ;
1313 return readLocalState ( ) ;
@@ -36,7 +36,7 @@ export async function postState(objects: GeomObject[]): Promise<void> {
3636 }
3737
3838 try {
39- const response = await fetch ( '/api/state' , {
39+ const response = await fetch ( '. /api/state' , {
4040 method : 'POST' ,
4141 headers : {
4242 'Content-Type' : 'application/json' ,
You can’t perform that action at this time.
0 commit comments