Skip to content

Commit

Permalink
feat: dep
Browse files Browse the repository at this point in the history
  • Loading branch information
sammaji committed Jun 29, 2024
1 parent 837413f commit 39dcdd0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions web/src/app/projects/[projectId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string | null>(
"Connecting...",
);
Expand Down

0 comments on commit 39dcdd0

Please sign in to comment.