Skip to content

The Devsocening #1100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions backend/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down Expand Up @@ -58,4 +58,3 @@ async def index() -> str:
def live_year() -> int:
""" sanity check for the live year """
return LIVE_YEAR

4 changes: 2 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/config/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion frontend/src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down