vldmr1986 / dfaas_beta

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SYSTEM REQUIREMENTS:

  • NODE JS: v. 16+
  • MARIADB: 10.8.3
  • Ansible (should be linked to python3)
  • python3
  1. Install backend packages
cd backend
npm install
  1. Env variables: There are 2 env files(you should create these 2 files on the server(inside the backend folder):
  • .env.integration
  • .env.prod So it convenient to switch between integration and production environments(see package.json):
  • integration: npm run intg
  • production: npm run prod

Info of each env file (use info of your DB, these values just for example)

PORT=443
DB_USERNAME=sd
DB_PASSWORD=password
DB_HOST=localhost
DB_PORT=3306
DB_NAME=db
// Get this info from backend team (each env
tenantId
issuer
api_client_id
api_client_secret

If need to create a new database with the tables (values provided for example)

DB_NAME=db
DB_TABLE_NAME=auth
  1. Certificates (get valid certificates - Mitra) Put 2 files (cert.crt, key.key) into folder "/backend/certificates"
  2. Create DB [OPTIONAL] (it will create db with the name in .env.<NODE_ENV>)
npm run create_db
  1. Build client (from the root project folder)
cd client && npm run build
  1. Run server (from the root project folder)
cd backend && npm run prod 
  1. Open port (from .env.<NODE_ENV>)
  2. Copy google credentials.json to the root of the backend folder (generate: https://developers.google.com/sheets/api/quickstart/nodejs)

About

License:MIT License


Languages

Language:JavaScript 93.8%Language:HTML 3.7%Language:Sass 2.0%Language:CSS 0.4%