diff --git a/frontend/.env b/frontend/.env deleted file mode 100644 index 454e5a8..0000000 --- a/frontend/.env +++ /dev/null @@ -1 +0,0 @@ -BACKEND_ADDRESS=http://localhost:42000/ \ No newline at end of file diff --git a/frontend/src/BlockList.tsx b/frontend/src/BlockList.tsx index 826f14b..abbd0bb 100644 --- a/frontend/src/BlockList.tsx +++ b/frontend/src/BlockList.tsx @@ -4,7 +4,8 @@ import axios from "axios"; export default function BlockList() { let [blocks, setBlocks] = useState([]); - let backendUrl: string = process.env.BACKEND_ADDRESS!; + let backendUrl: string = + process.env.BACKEND_ADDRESS || "http://localhost:42000/"; if (backendUrl === undefined) { throw Error("backend address not specified in ENV variable"); diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 4b5c674..c24e9d8 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -2,6 +2,4 @@ import React from "react"; import ReactDOM from "react-dom"; import App from "./App"; -require("dotenv").config(); - ReactDOM.render(, document.getElementById("root"));