A slack bot for Stevens Ultimate
$ npm install
- Get Slack API token and add it to the credentials folder in a file called slackToken.json formatted as {"token":"[token]"}
- Get Google calendar client secret and add it to the credentials folder as a file called client_secret.json
$ npm start
For google calendar client secret, follow these steps: https://developers.google.com/calendar/quickstart/nodejs For slack api, create the app and then navigate to OAuth and permissions. Then use Bot User OAuth access token Then it should work. For AWS setup with nodejs, follow this: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html please use ubuntu server for AWS - it is so much easier to work with for node and npm
screen node app.js
see this for more details
- install postfix:
sudo apt-get install postfix
- edit:
crontab -e
- (run as sudo su)
- edit permissions:
sudo chmod 777 .git
- service:
sudo service cron start | status | restart
- cronjob for updating git repo every hour:
0 * * * * su -s /bin/sh root -c 'cd /home/joshuatorwebsite/torwebsite && git pull origin master'
- every minute:
*/1 * * * *
0 * * * * su -s /bin/sh root -c 'cd /home/stevensultimateducks/Oswald && git pull origin master && node app.js'