From 306a19c3a62367bec07186a22f470eafabc6d3ce Mon Sep 17 00:00:00 2001 From: Sebastian Prentice Date: Fri, 8 Nov 2024 09:14:41 +0000 Subject: [PATCH 1/5] wip --- .env | 4 +++- README.md | 32 +++++++++++++++++++++++++++++++- public/appointments/index.html | 4 ++-- public/index.html | 4 ++-- public/simple/index.html | 4 ++-- src/components/shared/Error.js | 2 +- 6 files changed, 41 insertions(+), 9 deletions(-) diff --git a/.env b/.env index edcc27a6..c1d41e69 100644 --- a/.env +++ b/.env @@ -1,4 +1,6 @@ -REACT_APP_SOCKET_API_URL='https://socket.tutorcruncher.com' +# REACT_APP_SOCKET_API_URL='https://socket.tutorcruncher.com' +REACT_APP_SOCKET_API_URL='http://localhost:8000' PUBLIC_URL='/' REACT_APP_GRECAPTCHA_KEY='6LdyXRgUAAAAADUNhMVKJDXiRr6DUN8TGOgllqbt' REACT_APP_RELEASE='-' +REACT_EDITOR=pycharm diff --git a/README.md b/README.md index b504c2d5..54948864 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,34 @@ It defaults to use the TutorCruncher Socket backend, but you can use your own if Alternatively, you can just use TutorCruncher's API and build your own frontend. -[More documentation](https://help.tutorcruncher.com/en/articles/4843207-socket). +[Help Article](https://help.tutorcruncher.com/en/articles/4843207-socket). + + +## Setup and Run locally + +To set up and run this project, follow these steps: + +1. **Install dependencies:** + ```sh + nvm install 14 + nvm use 14 + yarn install + ``` +2. **Run the application:** + ```sh + yarn start + ``` +3. **Set the environment variables:** + ```sh + REACT_APP_SOCKET_API_URL='http://localhost:8000' + ``` +4. **Set the company public api key:** + + in `public/index.html` set `public_key` with the company's public api key + - dino tutors is = `9c79f14df986a1ec693c` + +5. **Set api root:** + + in `public/index.html` set `api_root` to the root of the api + - for local testing it is `http://localhost:8000` + - to use socket-beta it is `https://socket-beta.tutorcruncher.com` diff --git a/public/appointments/index.html b/public/appointments/index.html index 47db89d6..55d37720 100644 --- a/public/appointments/index.html +++ b/public/appointments/index.html @@ -32,8 +32,8 @@