Mike Slinn
Mike Slinn

Tweet Stream Manager

Published 2018-01-03.

This article is categorized under Node.js

I publish multiple tweet streams, so I wrote a Node.js web application using Express and Pug to help me manage them. This is what the user interface looks like. This is a silent video. Hopefully, it makes sense to everyone.

For example, ScalaCourses.com currently has two tweet streams, each with their schedule (times shown are HH:MM for a 24-hour clock):

  • ScalaCourses – tweets are published at 6:45 every day
  • SaleMore33 – This is a promotional campaign, starting on a certain day/time and ending on another day/time. This stream tweets at 3:24, 9:24, 13:24, 18:24, and 23:24.

crontab, running on a local XUbuntu machine, runs a Node.js command-line app that publishes the tweet streams:

NODE=/usr/bin/node
TWEETER=/var/work/training/projects/tweeter

45 6 * * *              $NODE $TWEETER/index.js $TWEETER/ScalaCourses
24 3,9,13,18,23 * * *   $NODE $TWEETER/index.js $TWEETER/SaleMore33 2018-01-03 2018-01-15

I have been thinking about re-implementing this command-line program as an AWS Lambda function one day. Instead of using CSV files for persistence, I'll probably go with Dynamo.