From 76e9f9f7ea180dd01207d307b45034d7f8b4a5df Mon Sep 17 00:00:00 2001 From: Rick Watson Date: Wed, 10 Apr 2019 08:31:39 +0100 Subject: [PATCH] #5 - Readme documentation states incorrect ENDPOINT_ROOT path for local hosting * Update README.md with correct instructions. * Update development enviornment file with indicitive value for locally hosting react app --- README.md | 6 +++++- interface/.env.development | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index df61fb6..bec153a 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,11 @@ npm start **NB: To run the interface locally you will need to modify the endpoint root path and enable CORS.** -The endpoint root path can be found in Endpoint.js (./interface/src/constants/). This needs to be the root URL of the device running the back end, for example "http://192.168.0.6". +The endpoint root path can be found in .env.development, defined as environment variable 'REACT_APP_ENDPOINT_ROOT'. This needs to be the root URL of the device running the back end, for example: + +``` +"http://192.168.0.6/rest/". +``` CORS can be enabled on the back end by uncommenting the -D ENABLE_CORS build flag in platformio.ini and re-deploying. diff --git a/interface/.env.development b/interface/.env.development index b21d356..fd792a3 100644 --- a/interface/.env.development +++ b/interface/.env.development @@ -1 +1 @@ -REACT_APP_ENDPOINT_ROOT=http://developer.openobjects.com:8080/ds5-services/endpoint/esp8266/esp8266/esp8266/ \ No newline at end of file +REACT_APP_ENDPOINT_ROOT=http://192.168.0.6/rest/ \ No newline at end of file