A JavaScript tool to mirror posts from a subreddit to a Twitter account.
This is a personal project cobbled together to expand my understanding of JavaScript promises. It's ugly, but it works.
- You'll need a Twitter API key and a Reddit account or API key
- (see the "Setting Up Snoowrap" section of this article for more info on the latter).
- Set up the bot
- Clone the repo
- Run
yarn install --production
- Copy
.env.example
to.env
and fill out the details.
- Set up a cron job to run "node bot.js" however often you want the bot to post on Twitter.
- Ex:
0,30 * * * * /usr/bin/node /home/ralph/rtt/bot.js > /dev/null 2>&1
to run the bot twice an hour
- Ex:
This is far from the best/cleanest implementation of this concept, so I'd be very grateful for any issues/pull requests.
This project follows the AirBNB style guide, please ensure yarn test
completes successfully before creating a pull request.