Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ealexisaraujo/tweetnode
https://github.com/ealexisaraujo/tweetnode
grapql-server javascript nodejs rabbitmq-client redis
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ealexisaraujo/tweetnode
- Owner: ealexisaraujo
- Created: 2020-04-09T00:27:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T02:09:54.000Z (almost 2 years ago)
- Last Synced: 2023-03-07T20:30:08.400Z (over 1 year ago)
- Topics: grapql-server, javascript, nodejs, rabbitmq-client, redis
- Language: JavaScript
- Size: 1.48 MB
- Stars: 7
- Watchers: 4
- Forks: 4
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Twitter Applicaton Process.
The application consists of 3 processes:
- [`twitter-stream`]
- [`load-data`]
- [`api`]#### Environment variables
- `NODE_ENV` : `development`
- `LOGGER_LEVEL` (`'debug' | 'info'`), default: `info`
- `LOGGER_ENABLED` (`'true' | 'false'`), default: `true`
- `TWITTER_CONSUMER_KEY`
- `TWITTER_CONSUMER_SECRET`
- `TWITTER_ACCESS_TOKEN_KEY`
- `TWITTER_ACCESS_TOKEN_SECRET`
- `TWITTER_TRACK`: comma separated keywords to track, eg. `platzi,open source, etc`
- `RABBITMQ_URI`:`amqp://rabbitmq_service`
- `REDIS_URI`:`redis://redis_service`
- `REDIS_DATA_RETENTION_IN_MS`:`86400000`
- `PORT`: `3000`## Docker Compose
Use the docker-compose file to be run.
```shell
docker-compose up -d
```### Twitter stream
Listening on API twitter for keywords and sends the tweets to a RabbitMQ queue.
### Load Data
Listening on the RabbitMQ queue and saves the tweets to Redis.
### API
The process is serving an API in GraphQL to return the tweets.
- `http://localhost:3000`
- `Query to list tweets`
```shell
query {
get(key:"tweets"){
text
tweeter
createdAt
}
}
```