sjdonado / openchargemap-sync

GraphQL + MongoDB + RabbitMQ + Docker - no frameworks :)
0 stars 0 forks source link

Feat/#4 pulling service setup #5

Closed sjdonado closed 1 year ago

sjdonado commented 1 year ago

Pulling service is renamed to scraper.

Summary

  1. package.json with dev and test scripts
  2. tsconfig + eslint + prettier + jest configured
  3. docker-compose with mongo, rabbitMQ and redis
  4. config folder using dotenv
  5. The repository folder contains the functions to open the mongo and rabbitMQ connections

Expanding (5) connectDatabase, connectMessageQueue are pure functions with the following contracts:

  1. connectDatabase returns [collections: Object, disconnect: Promise<void>]
  2. connectMessageQueue returns [startConsumer: Promise<void>, publishMessage: Promise<boolean>, disconnect: Promise<void>]