A temporary Twitter client for fetching recent tweets for use while Twitter is closed to guest users.
Based on this script by polkaulfield.
🚀 Publish new version - Create a PR that will push the contents of main to the Docker registry when merged
Create a file docker-compose.yml with the following content:
version: '3'
services:
web:
image: ghcr.io/12joan/twitter-client:production
environment:
REDIS_URL: redis://redis:6379
HOST: '0.0.0.0'
ports:
- 3000:3000
depends_on:
- redis
redis:
image: redis:latestStart using docker-compose up -d and access at http://localhost:3000/.
The production tag is updated when the deployment branch receives new commits. You can also try out the lastest version on main using the alpha tag. Anyone can update the deployment branch by clicking the Publish new version link at the top of this README.
You can fetch recent Tweets as JSON from http://localhost:3000/:username.
Example: http://localhost:3000/amnesty
To format the results as an RSS feed, use http://localhost:3000/:username/rss.
Optionally, specify a preset "flavour" of RSS using http://localhost:3000/:username/rss?flavour=slack. Supported flavours:
default- Title: Tweet text
- Description: Tweet text + media URLs as image tags
slack- Title: Tweet URL
- Description: Tweet text + media URLs as links
To start the server,
$ yarn install # See https://github.com/12joan/twitter-client/issues/6
$ docker-compose up --build
To check types on file change,
$ yarn typecheck:watch
To fix code formatting,
$ yarn lint --fix