From 8b8b0aa4e8d235945726e079a5220a911526f417 Mon Sep 17 00:00:00 2001 From: sachk Date: Mon, 5 Feb 2024 00:15:32 +1100 Subject: [PATCH] feat: the devsocening --- .github/workflows/docker.yml | 2 +- README.md | 2 +- backend/server/server.py | 3 +-- frontend/README.md | 4 ++-- frontend/package.json | 4 ++-- frontend/src/config/axios.ts | 2 +- frontend/src/config/constants.ts | 2 +- frontend/src/types/api.ts | 2 +- 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 160e7ea43..5b4305bf6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,7 +18,7 @@ jobs: - component: frontend dockerfile: production.dockerfile args: | - "API_URL=https://circlesapi.csesoc.app" + "API_URL=https://circlesapi.devsoc.app" - component: backend dockerfile: production.dockerfile steps: diff --git a/README.md b/README.md index ab84b5664..1dd791e46 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Tired of using a poorly laid out spreadsheet to cobble together a plan to follow Circles is a UNSW degree planner where you can explore and validate your degree structure. -You can find a live build of Circles at [https://circles.csesoc.app](https://circles.csesoc.app/). +You can find a live build of Circles at [https://circles.devsoc.app](https://circles.devsoc.app/). ## Features diff --git a/backend/server/server.py b/backend/server/server.py index 183a1c982..2d484d015 100644 --- a/backend/server/server.py +++ b/backend/server/server.py @@ -27,7 +27,7 @@ "http://frontend:3000", "http://frontend:3001", "https://circles.csesoc.unsw.edu.au", - "https://circles.csesoc.app", + "https://circles.devsoc.app", "https://cselectives.staging.csesoc.unsw.edu.au", "https://cselectives.csesoc.unsw.edu.au", ] @@ -58,4 +58,3 @@ async def index() -> str: def live_year() -> int: """ sanity check for the live year """ return LIVE_YEAR - diff --git a/frontend/README.md b/frontend/README.md index 7aeafce4c..3a681cad1 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -15,7 +15,7 @@ If you are doing superficial work with the frontend and do not need to communicate with the backend, you can `cd` to the `frontend` folder, run `npm install` to install required packages locally, and then `npm start`. This is faster than running docker compose since you avoid having to set up the backend and mongodb containers. -> NOTE: Your frontend requests will be fetching from `https://circlesapi.csesoc.app` and the production version of the Circles API will be used to handle your backend requests. +> NOTE: Your frontend requests will be fetching from `https://circlesapi.devsoc.app` and the production version of the Circles API will be used to handle your backend requests. ### Option 2: Using Docker @@ -46,7 +46,7 @@ In `frontend.env`, add: - `VITE_BACKEND_API_BASE_URL=http://localhost:8000/` -> NOTE: The `VITE_BACKEND_API_BASE_URL` environment variable is the base url endpoint that the backend is running on. If the environment variable is not specified, the react application will default to using `https://circlesapi.csesoc.app/` as the base url when calling the API endpoint. +> NOTE: The `VITE_BACKEND_API_BASE_URL` environment variable is the base url endpoint that the backend is running on. If the environment variable is not specified, the react application will default to using `https://circlesapi.devsoc.app/` as the base url when calling the API endpoint. Feel free to replace username and password to any value. The username and password in `backend.env` must match the values in `mongodb.env`. The `env` folder has been added to `.gitignore` and will not be committed to the repo. diff --git a/frontend/package.json b/frontend/package.json index 6b7306b24..0f8f9a393 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -36,10 +36,10 @@ }, "scripts": { "start": "vite --port 3000 --host", - "start:local": "VITE_BACKEND_API_BASE_URL=https://circlesapi.csesoc.app vite --port 3000 --host", + "start:local": "VITE_BACKEND_API_BASE_URL=https://circlesapi.devsoc.app vite --port 3000 --host", "build": "vite build", "preview": "vite preview --port 3000 --host", - "preview:local": "VITE_BACKEND_API_BASE_URL=https://circlesapi.csesoc.app vite preview --port 3000 --host", + "preview:local": "VITE_BACKEND_API_BASE_URL=https://circlesapi.devsoc.app vite preview --port 3000 --host", "test": "vitest run", "coverage": "vitest run --coverage", "lint": "eslint src/**/*.{ts,tsx}", diff --git a/frontend/src/config/axios.ts b/frontend/src/config/axios.ts index 452787bce..2db1e2d42 100644 --- a/frontend/src/config/axios.ts +++ b/frontend/src/config/axios.ts @@ -2,6 +2,6 @@ import axios from 'axios'; // fallback to localhost port 8000 if env variable is not specified axios.defaults.baseURL = - import.meta.env.VITE_BACKEND_API_BASE_URL || 'https://circlesapi.csesoc.app/'; + import.meta.env.VITE_BACKEND_API_BASE_URL || 'https://circlesapi.devsoc.app/'; axios.defaults.headers.post['Content-Type'] = 'application/json'; diff --git a/frontend/src/config/constants.ts b/frontend/src/config/constants.ts index 93b179b15..cf7f3cd70 100644 --- a/frontend/src/config/constants.ts +++ b/frontend/src/config/constants.ts @@ -7,7 +7,7 @@ export const CURR_YEAR = new Date().getFullYear(); export const TERM = `${CURR_YEAR + (getMostRecentPastTerm(CURR_YEAR).T === 3 ? 1 : 0)}-T${ (getMostRecentPastTerm(CURR_YEAR).T + 1) % 3 }`; -export const TIMETABLE_API_URL = `https://timetable.csesoc.app/api/terms/${TERM}/courses`; +export const TIMETABLE_API_URL = `https://timetable.devsoc.app/api/terms/${TERM}/courses`; // Global colors - currently only being used in LiquidProgressChart export const lightYellow = '#f9b01e'; diff --git a/frontend/src/types/api.ts b/frontend/src/types/api.ts index 89c19219c..c717b2339 100644 --- a/frontend/src/types/api.ts +++ b/frontend/src/types/api.ts @@ -4,7 +4,7 @@ import { ProgramStructure } from './structure'; // types are layed out from the BE api routes // more info can be found on the /docs on the BE url -// https://circlesapi.csesoc.app/docs +// https://circlesapi.devsoc.app/docs /* Planner api */