rewrite nginx path

This commit is contained in:
Eddie Wang 2019-12-03 16:45:38 -05:00
parent 49a1d1b719
commit 0cfadf91a8
No known key found for this signature in database
GPG Key ID: DBFB3E83121BEDD1
2 changed files with 5 additions and 2 deletions

View File

@ -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\""

View File

@ -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")