- Require to install
- NodeJS 12+ https://nodejs.org/
- yarn https://classic.yarnpkg.com/en/docs/install/#debian-stable
- Install node modules
yarn install - installing node modules for backend part
cd client && yarn install - installing node modules for frontend part
- Run locally
yarn server - run backend part
yarn client - run frontend part
or
yarn dev - run both backend and frontend
- Run in production mode
yarn build - build React production-build
yarn start - run start.js file with setupped environment
MONGO_DB_USER - name of user with access to MongoDB
MONGO_DB_PASSWORD - password for user
MONGO_DB_HOST - host name for application
MONGO_DB_NAME - name of the database
You can use command migrations only once - after Up should be Down, after Down - Up.
- Add new admin
yarn migrate-admin-up
- Remove all admins
yarn migrate-admin-down
- Add new defibrillators (from db_collections/defibrillators.json file)
yarn migrate-defibrillators-up
- Remove all defibrillators
yarn migrate-defibrillators-down
SECRET_JWT_KEY_AUTH - jwt secret key based on email and id
EXPIRE_TIME_JWT_AUTH - expiration time 1 hour
SECRET_JWT_KEY_SIGN_UP - jwt secret key based on email
EXPIRE_TIME_JWT_SIGN_UP - expiration time 1 hour
SECRET_JWT_KEY_RESET - jwt secret key for password reseting
EXPIRE_TIME_JWT_RESET - expiration time 1 hour
BASE_URL - URL for redirection to main page of app from email
EMAIL_USER - Mail account username
EMAIL_PASSWORD - Mail account password
EMAIL_FROM - Mail account for users notification(successfull registration, password reseting ...)
ADMIN_EMAIL
ADMIN_PASSWORD
Generate your own Google API key in developer console https://developers.google.com/maps/documentation/geocoding/get-api-key
GOOGLE_API_KEY