Skip to content

Latest commit

 

History

History
117 lines (80 loc) · 1.41 KB

README.md

File metadata and controls

117 lines (80 loc) · 1.41 KB

BTC_UAH_API

Technology stack

  • TypeScript
  • Express.js
  • Jest / Supertest
  • Docker

Architecture

BTC TO UAH ARCH (1)

Installation

Clone project

git clone https://github.com/GenesisEducationKyiv/hw1-se-school_2022-code-review-DHushchin

Install dependencies

npm install

Set up environment

  • Create .env file
EMAIL_NAME="example@gmail.com"
EMAIL_PASSWORD="example_password"
EMAIL_HOST="smtp.gmail.com"
EMAIL_PORT="587"
COINMARKETCAP_API_KEY="example_api_key"
PORT="3000"
AMQP_USER="user"
AMQP_PASSWORD="password"
AMQP_HOST="rabbitmq"
AMQP_PORT="5672"

Usage

Node

npm start

Linters

npm run format:check
npm run format:fix
npm run tslint:check
npm run tslint:fix

Testing

npm test

Dockerfile

  • Build image
docker build -t btc_auh_api .
  • Run container
docker run -d -p 3000:3000 --rm --name rate btc_auh_api
  • Stop container
docker stop rate

Makefile

You can also do the same using Makefile.

  • Build image
make build
  • Run container
make run
  • Stop container
make stop

Docker-compose

  • Run services
docker-compose run --rm waitforrabbit
docker-compose up btc-uah log-consumer