backend to retrieve tweets and tweet comments
GET /public-tweets/:tweet-id
- Returns tweet details oftweet-id
.GET /public-tweets/:tweet-id/comments
- Returns tweet comments oftweet-id
.
This server uses PostgreSQL
Add connection details to .env
file in project root:
DB_HOST=dbhost
DB_USER=dbuser
DB_PASSWORD=dbpassword
DB_NAME=dbname
DB_PORT=dbport
Filling the right side with the relevant information.
table name public_tweet
id: int4 (sequence, UNIQUE),
updated_at: timestamptz,
created_at: timestamptz,
tweet_id: varchar (UNIQUE),
user_id: varchar,
tweet_created_at: varchar,
full_text: varchar,
retweet_count: int4,
favorite_count: int4,
reply_count: int4,
quote_count: int4,
user_name: varchar,
reply_to_tweet_id: varchar,
After DB was configured as above:
- Run server -
npm start
- Run dev server -
npm run dev