@@ -148,6 +148,14 @@ POST /game/{game_id}/round/{round}/timeout/{player_id}
}
```
+## Local Dev
+
+Change the proxy line in package.json to point to live server
+```json
+ "proxy": "https://hiram.services/",
+```
## Next Steps
### Planned Game Modes
@@ -1,3 +1,2 @@
-REACT_APP_API_BASE=https://hiram.services/terrassumptions/api
REACT_APP_MONITOR_STORE=false
REACT_APP_GOOGLE_API_KEY=AIzaSyCDtEWf192OYuMvd2cp8a04DYQo-RU_sXs
@@ -1,4 +1,2 @@
-# REACT_APP_API_BASE=http://localhost:5000
-# above can be uncommented to point to local server/app.py
REACT_APP_MONITOR_STORE=true
REACT_APP_GOOGLE_API_KEY=.
@@ -31,6 +31,7 @@
"eject": "react-scripts eject",
"deploy": "scp -r build hiram:/opt/terrassumptions/srv/build-$(date +'%Y-%m-%dT%H:%M:%S')"
},
+ "proxy": "http://localhost:5000/",
"prettier": {
"arrowParens": "avoid"
@@ -1,4 +1,4 @@
-const API_BASE = process.env.REACT_APP_API_BASE;
+const API_BASE = "/terrassumptions/api";
export const getStatus = async () => {
try {
@@ -16,4 +16,4 @@ RUN pip3 install -r requirements.txt
COPY ./app /app/app
-CMD uvicorn app:app --host 0.0.0.0 --port 5000 --root-path /terrassumptions/api
+CMD uvicorn app:app --host 0.0.0.0 --port 5000
@@ -13,8 +13,8 @@ logging.config.fileConfig('logging.conf', disable_existing_loggers=False)
app = FastAPI()
-app.include_router(other)
-app.include_router(game, prefix="/game")
+app.include_router(other, prefix="/terrassumptions/api")
+app.include_router(game, prefix="/terrassumptions/api/game")
app.add_middleware(