vish-app-backend

Backend app to get university schedule via parse google docs sheets (with updates in interval time)

BSD-3-CLAUSE License

Stars
0

Vish backend app


Stack

  • Docker
  • Nginx
  • Vite
  • Typescript
  • Express
  • MongoDB
  • Google sheets api
  • Swagger
  • Github actions

Config app

An example of the config is in .env.example, but to use it you need to create .env

Integration of the config from .env into javascript variables and all constants are in ./src/shared/constants.ts

Production mode

Build

docker build --build-arg APP_WHITELIST_IPS_PROD="[\"PROD_DOMAIN\"]" \
  --build-arg APP_VERSION=APP_VERSION \
  --build-arg VITE_BACKEND_PORT=PORT \
  --build-arg API_GETAWAY=/api \
  --build-arg DB_URL="DB_URL" \
  --build-arg UPDATE_UNIVERSITY_SCHEDULE_INTERVAL_IN_MS=TIME_MS \
  --build-arg GOOGLE_SHEETS_SCHEDULE_TABLE_ID=TABLE_ID \
  --build-arg START_COUNT_WEEKS_FROM="01.09.2024" \
  -t vish-backend .

Run

docker run -p GLOBAL_PORT:GLOBAL_PORT --restart=unless-stopped vish-backend

Development mode

Run express app pnpm run dev:express

Run vite proxy server pnpm run dev:vite

Run backend app with proxy host for local network

pnpm run dev