Skip to content

A slackbot which takes in a zip code and displays the conditions for that location

Notifications You must be signed in to change notification settings

ryadav88/slack-weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A slackbot which takes in a zip code and displays the conditions for that location.

Prerequisites:

brew install node git

Installation and running

Once you have the 3 files setup, jump to weather-slackbot folder and install all the dependencies.

npm i

After npm is finished installing dependencies, run:

node index.js

The app is running. Visit http://localhost:9001. You should see “Running!!”. It is now listening for requests at port 9001.

Deploying to Heroku

Now we have to deploy this code to Heroku where Slack can send requests. If you haven’t signed up for a Heroku account yet, do it now. Then install the heroku toolbelt, login, create the app, and finally push it. Follow and run these commands:

brew install heroku-toolbelt
heroku login
heroku create
git push heroku master

To check if it is working, type:

heroku open

and you see see the “Running!!” message. Now go ahead and add the Weather Underground API key under WU_ACCESS

heroku config:add WU_ACCESS=[your API key]

Check the Heroku dashboard to see if your app is there.

Slack setup

Open slack, go to your team’s custom integration page and add a slash command.

Read this blog post for a better understanding

About

A slackbot which takes in a zip code and displays the conditions for that location

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published