url fix
This commit is contained in:
xrando 2023-10-31 17:41:08 +08:00
parent 08e4d64658
commit 3373b4581c
2 changed files with 5 additions and 6 deletions

View File

@ -1,2 +1 @@
REACT_APP_API_HOST=http://127.0.0.1 REACT_APP_API_HOST=http://127.0.0.1:8000
REACT_APP_API_PORT=8000

View File

@ -23,10 +23,10 @@ function ShareFile() {
const [errorMsg, setErrorcode] = useState(''); const [errorMsg, setErrorcode] = useState('');
let subtitle; let subtitle;
const [modalIsOpen, setIsOpen] = React.useState(false); const [modalIsOpen, setIsOpen] = React.useState(false);
const apiHost = process.env.REACT_APP_API_HOST || 'localhost'; const apiUrl = process.env.REACT_APP_API_HOST || 'localhost:8000';
const apiPort = process.env.REACT_APP_API_PORT || '8000'; // const apiPort = process.env.REACT_APP_API_PORT || '8000';
//
const apiUrl = `${apiHost}:${apiPort}`; // const apiUrl = `${apiHost}:${apiPort}`;
function openModal() { function openModal() {
setIsOpen(true); setIsOpen(true);