diff --git a/package.json b/package.json index eb0aecfa..f0749443 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "scripts": { "client-dev": "yarn workspace siaviewnode-client dev -p 3000", "server-dev": "yarn workspace siaviewnode-server dev", - "client-prod": "yarn workspace siaviewnode-client start -p 3000", + "client-prod": "yarn workspace siaviewnode-client build && yarn workspace siaviewnode-client start -p 3000", "server-prod": "yarn workspace siaviewnode-server build && yarn workspace siaviewnode-server start", "dev": "concurrently \"yarn client-dev\" \"yarn server-dev\"", "start": "concurrently \"yarn client-prod\" \"yarn server-prod\"" diff --git a/packages/siaviewnode-client/src/components/Dropzone.tsx b/packages/siaviewnode-client/src/components/Dropzone.tsx index 00bec0d9..27765b9b 100644 --- a/packages/siaviewnode-client/src/components/Dropzone.tsx +++ b/packages/siaviewnode-client/src/components/Dropzone.tsx @@ -4,7 +4,10 @@ import { useCallback } from "react" import { useDropzone } from "react-dropzone" import { Box, Flex, jsx } from "theme-ui" -const API_ENDPOINT = "http://144.76.136.122/api" +/** + * nginx is setup to automatically handle and rewrite the url path. + */ +const API_ENDPOINT = "/api" const pName = R.prop("name")