update local dev docs

This commit is contained in:
timothycarambat 2023-08-16 15:34:03 -07:00
parent 2036204f23
commit 8af817e2d5
3 changed files with 11 additions and 1 deletions

View File

@ -71,7 +71,15 @@ This monorepo consists of three main sections:
- `yarn setup` from the project root directory.
- This will fill in the required `.env` files you'll need in each of the application sections. Go fill those out before proceeding or else things won't work right.
- `cd frontend && yarn install && cd ../server && yarn install` from the project root directory.
To boot the server locally (run commands from root of repo):
- ensure `server/.env.development` is set and filled out.
`yarn dev:server`
To boot the frontend locally (run commands from root of repo):
- ensure `frontend/.env` is set and filled out.
- ensure `VITE_API_BASE="http://localhost:3001/api"`
`yarn dev:frontend`
Next, you will need some content to embed. This could be a Youtube Channel, Medium articles, local text files, word documents, and the list goes on. This is where you will use the `collector/` part of the repo.

2
frontend/.env.example Normal file
View File

@ -0,0 +1,2 @@
VITE_API_BASE='http://localhost:3001/api' # Use this URL when developing locally
# VITE_API_BASE='/api' # Use this URL deploying on non-localhost address OR in docker.

View File

@ -11,7 +11,7 @@
"scripts": {
"lint": "cd server && yarn lint && cd .. && cd frontend && yarn lint",
"setup": "cd server && yarn && cd ../frontend && yarn && cd .. && yarn setup:envs && echo \"Please run yarn dev:server and yarn dev:frontend in separate terminal tabs.\"",
"setup:envs": "cp -n ./server/.env.example ./server/.env.development && cp -n ./collector/.env.example ./collector/.env && cp -n ./docker/.env.example ./docker/.env && echo \"All ENV files copied!\n\"",
"setup:envs": "cp -n ./frontend/.env.example ./frontend/.env && cp -n ./server/.env.example ./server/.env.development && cp -n ./collector/.env.example ./collector/.env && cp -n ./docker/.env.example ./docker/.env && echo \"All ENV files copied!\n\"",
"dev:server": "cd server && yarn dev",
"dev:frontend": "cd frontend && yarn start",
"prod:server": "cd server && yarn start",