Skip to content

raymonstah/asianamericanswiki

Repository files navigation

AsianAmericans.wiki

About

Source code for AsianAmericans.wiki.

Running Locally

To run tailwind watcher:

 npx tailwindcss -i functions/api/server/public/static/input.css -o ./functions/api/server/public/static/output.css --watch

To run the emulators:

firebase emulators:start --only "auth,firestore"

To run the backend locally (emulators required):

go run functions/api/cmd/main.go --local

Or use air (for hot reload)

air

Deploying manually to Cloud Run

export IMAGE_NAME=us-central1-docker.pkg.dev/asianamericans-wiki/asianamericanswiki-api/api
docker build -t $IMAGE_NAME . --platform linux/amd64
docker push $IMAGE_NAME
gcloud run deploy apiv2 --max-instances 1 --timeout 10 --region us-central1 --memory 128Mi --image ${IMAGE_NAME}:latest --allow-unauthenticated

Formatting

All source code should be formatted with prettier for consistency.

npm run prettier

Search

There is a Firestore -> Algolia extension used for the search index.