The application consists of 3 processes:
- [
twitter-stream] - [
load-data] - [
api]
NODE_ENV:developmentLOGGER_LEVEL('debug' | 'info'), default:infoLOGGER_ENABLED('true' | 'false'), default:trueTWITTER_CONSUMER_KEYTWITTER_CONSUMER_SECRETTWITTER_ACCESS_TOKEN_KEYTWITTER_ACCESS_TOKEN_SECRETTWITTER_TRACK: comma separated keywords to track, eg.platzi,open source, etcRABBITMQ_URI:amqp://rabbitmq_serviceREDIS_URI:redis://redis_serviceREDIS_DATA_RETENTION_IN_MS:86400000PORT:3000
Use the docker-compose file to be run.
docker-compose up -dListening on API twitter for keywords and sends the tweets to a RabbitMQ queue.
Listening on the RabbitMQ queue and saves the tweets to Redis.
The process is serving an API in GraphQL to return the tweets.
-
http://localhost:3000 -
Query to list tweets
query {
get(key:"tweets"){
text
tweeter
createdAt
}
}