This is a simple node.js app that polls your meetup.com group, follows any of your members with a Twitter account from your Twitter account and sends out Tweets announcing the meetups. The app contains the files necessary to run this on Heroku, making use of the scheduler as well as locally.
- Clone this repo and install dependencies with
npm install
- Get a meetup.com API key
- Register your app with Twitter.com
- Set the environment variables. See the env.sh file for the environment variables that need to be set. You can run this script once edited to set the variables.
After setting the environment variables...
$ node app.js --dry-run --tweet --tweetMaxDelayMinutes 15 --follow -p 60
-
--dry-run
Disables tweeting and following and logs info instead -
--tweet
Enables tweeting of todays meetups--tweetMaxDelayMinutes
Sets the max minutes that tweets will be delayed by before sending
-
--follow
Enables following of your meetup members-p
flag specifies the polling interval for the following
- Edit the heroku.sh file and enter the proper credentials and information for meetup.com and twitter
- Create your node.js app on Heroku
- Run the heroku.sh bash script
- Deploy, ensure you set the default web dyno to false (
heroku ps:scale tweet_meetups=1
) - Enable the heroku scheduler
heroku addons:add scheduler
- Open the scheduler with
heroku addons:open scheduler
- Add a job called
tweet_meetups
(see Procfile) - Add a job called
follow_meetup_members
- Add a job called
You can temporarily enable the processes for debugging, remember to scale them back, or the next push will trigger them again.
- heroku ps:scale tweet_meetups=1
- heroku ps:scale follow_meetup_members=1