From 39dcdd0846b4935d0cae2ef081c9752da6f60455 Mon Sep 17 00:00:00 2001 From: samyabrata-maji Date: Sun, 30 Jun 2024 03:15:52 +0530 Subject: [PATCH] feat: dep --- README.md | 20 ++++++++++++++++++++ web/src/app/projects/[projectId]/page.tsx | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a50581 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# TermAI + +## Installation Guide + +### Setting up socket server: +- To start socket server go to `server` folder. +- Provide env variables `APP_URL` & `API_URL` for frontend and backend server respectively. +- Run `npm install` or `pnpm install` to install dependencies. +- Start server using `npm run dev` or `pnpm dev` (runs in port `3000` by default). + +Socket server must be running while working with the frontend terminal. + +### Setting up frontend and backend api: +- To start frontend go to `web` folder. +- Create .env file and provide the env variables shown in .env.example file. +- Run `npm install` or `pnpm install` to install dependencies. +- Start server using `npm run dev` or `pnpm dev` (runs in port `4000` by default). + +## Tech Stack +- Typescript, Next.js, Socket.io, MongoDB, Docker, Google Cloud Run \ No newline at end of file diff --git a/web/src/app/projects/[projectId]/page.tsx b/web/src/app/projects/[projectId]/page.tsx index a46feb6..743fe39 100644 --- a/web/src/app/projects/[projectId]/page.tsx +++ b/web/src/app/projects/[projectId]/page.tsx @@ -27,9 +27,9 @@ export default function Page({ }) { const SOCKET_URL = process.env.SOCKET_URL || - "https://term-ai-socket-server-cloud-run-bwvgjyky6q-el.a.run.app"; + "https://term-ai-socket-server-bwvgjyky6q-el.a.run.app"; console.log(SOCKET_URL); - const socket = useRef(io("http://localhost:3000")); + const socket = useRef(io(SOCKET_URL)); const [statusMessage, setStatusMessage] = useState( "Connecting...", );