The API to manage communication between other services in HarvTech.
CC0-1.0 License
Follow all commands bellow.
Create .env file in root folder with content.
WEB_URL=<set Web URL >
AI_URL=<set AI URL >
JWT_SECRET=<set JWT secret >
JWT_EXPIRES=<set JWT expires >
AZURE_ACCOUNT_NAME=<set Azure account name >
AZURE_ACCOUNT_KEY=<set Azure account key >
AZURE_STORAGE_CONTAINER_URL=<set storage container URL >
DB_HOST=<set database host >
DB_DOCKER_PORT=<set Docker database port >
DB_PORT=<set database port >
DB_NAME=<set database name >
DB_USERNAME=<set database username >
DB_PASSWORD=<set database password >
CRYPTO_ALGORITHM=<set crypto algorithm >
CRYPTO_KEY=<set crypto key >
CRYPTO_IV=<set crypto IV >
PORT=<set port >
MODE=<set mode >
yarn
yarn prepare
yarn db
yarn dev
yarn prod:build && yarn prod:start
Our tests are made with Jest. Use *.test.ts
for integration tests and *.spec.ts
for unit tests. Run the commands below.
yarn test
yarn test:watch
yarn test:quiet
yarn test:coverage
In this project we use TypeORM for migrations. Run the commands below.
yarn migration:run
yarn migration:generate src/migrations/<name>
yarn schema:sync
Go to File > Settings > Languages & Frameworks > JavaScript > Code Quality Tools > ESLint
, select Automatic ESLint configuration and check Run eslint --fix on save, or read the ESLint documentation for WebStorm.
Go to File > Settings > Languages & Frameworks > JavaScript > Prettier
, check On 'Reformat Code' action and check On save, or read the Prettier documentation for WebStorm.
Run commands:
yarn lint
yarn lint:fix
Run commands:
yarn prettier
yarn prettier:fix
yarn format
You should be very specific in file names.
review
directory.README.md
.SanitizeHelper
for entries.Product made by Tech Warriors.