This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Development Setup
Rupesh Parab edited this page Feb 21, 2021
·
2 revisions
Frontend (Repo)
- Setup node >= 12 and npm - Link
- Run
npm install
from the project directory, this will install dependencies for v1 frontend (desktop) - Run
npm install
fromv2
folder in project directory, this will install dependencies for v2 frontend (mobile) - To start v1, run
npm run start
from main project directory and for v2, run the same command inv2
folder - Both the versions are dependent on Backend and you will need to follow the steps mentioned in the backend section to start the backend service before running the frontend.
- (optional) Frontend repo also has an
automation
folder which runs few tests on QA. These are optional. - Run
yarn install
inautomation
folder to install dependencies - Run
element run test-case-1.ts
inautomation
folder to start automation
- NODE_ENV - this has 'development' in local and 'production' in all deployed environments
- INTERCOM_APP_ID - Intercom App id
Backend (Repo)
- Install Docker and Docker Compose
- Run
docker-compose build
from the backend project directory - Run
docker-compose up
to start the backend, ensure that no services are running on 8080 port
- Stop running docker containers using
docker-compose stop
ordocker-compose down
- Run
docker-compose build
to rebuild backend, this will build java backend as well as the node gateway. It can throw errors if any unit test fails or static code analysis fails in java or node. - Run
docker-compose up
to start service again
- Data is persisted by default in
mathsharebackend_db-data
- Stop running docker containers using
docker-compose stop
ordocker-compose down
- Run
docker volume rm mathsharebackend_db-data
to remove persisted data - Run
docker-compose up
to start service again
- SPRING_DATASOURCE_URL - JDBC connection string for postgres
- POSTGRES_PASSWORD - Postgres password
- POSTGRES_USER - Postgres user
- POSTGRES_DB - Postgres database
- WATSON_API_KEY - IBM watson API key, used for Speech2Text
- GATEWAY_BASE_URL - API base url for gateway
- CORS_ORIGIN - Base URL of the frontend app (this prevents other external web-apps from calling API)
- DATABASE_URL - Postgres DB url
- NODE_ENV - this has 'development' in local and 'production' in all deployed environments
- SESSION_SECRET - used for encrypting session as well as for admin api requests
- GOOGLE_ID - Google App Id (Used for login in passport js)
- GOOGLE_SECRET- Google App Secret (Used for login in passport js)
- AZURE_ID - Azure App Id (Used for login in passport js)
- AZURE_SECRET - Azure App Secret (Used for login in passport js)