Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
Binary file added week4/.DS_Store
Binary file not shown.
Binary file added week4/homework/.DS_Store
Binary file not shown.
Binary file added week4/homework/responses/.DS_Store
Binary file not shown.
19 changes: 19 additions & 0 deletions week4/homework/responses/4.1-express.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ⚡️Express

This week will involve using a popular JavaScript framework called Express. Frameworks essentially give you a fundamental structure that you can build on without starting completely from scratch. For example, Bolt is also a framework!



## 📚Reading Up

Express is a pretty large framework, so you will need to do a little reading to understand its basic functions. Look at the Express-related sections in [this article](https://codeforgeek.com/express-nodejs-tutorial/) for some general information.

After you are done, read [this article](https://codeforgeek.com/handle-get-post-request-express-4/) on POST and GET requests. Comment one idea for a Slack app using Express and a couple of things that stood out to you or you had questions on while researching the framework.



## 🔨Challenge

Create a post request that prints a hello message to your local host server. Create another post request that takes parameters for a book and author, then prints out a sentence using the information.

Refer to the articles above and feel free to reach out to your mentors with any questions!
34 changes: 34 additions & 0 deletions week4/homework/responses/4.2-webhooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Webhooks

Webhooks are applications that send other apps useful information. They are extremely useful and can expand your Slack apps to a new level!

## 🧠Reading

Read [this article](https://sendgrid.com/blog/whats-webhook/). When you're done, research a couple webhooks and comment some ideas for a Slack app using some of them. Refer to [this site](https://www.programmableweb.com/news/33-webhook-apis-assembla-mailchimp-and-podio/2013/09/04) following sites for some webhooks.

## 🔨Creating Your Own Webhook

Now it is time to create a webhook yourself! We will be using GitHub in this camp. Github is a verison control site that lets you maintain repositories of code across several iterations. It is extremely useful for both personal and proffessional projects.

If you don't have an account already, create one at www.github.com. You will need a repository, which can be created by pressing the 'create repository' button at the top left of your dashboard:

![](./Gifs:Images/4.1-creating-repo.gif)

Once you have created a repository, navigate to the settings page from the dashboard and select 'secrets'. You will need a secret in order to access the repository. Create an arbitrary secret name and value.

![](./Gifs:Images/4.2-secret.gif)

Next, start your Slack app and create an ExpressReceiver object. Call the post message for the receiver with a parameter of '/github-stars'. Run the app, making sure to connect it to an ngrok server. Then, navigate to 'webhooks' in your Github repository settings. Create a webhook and set the payload URL to be the ngrok server URL with the parameter of the ExpressReceiver at the end. Copy and paste the secret value you create into the 'Secret' field. Lastly, select individual events and choose 'starred', then press 'update'. Check the ngrok server in your terminal to see if the webhook connected successfully.



## 🏁Challenge

Your challenge for today is to implement the payload from the Github webhook to send a message in your Slack app. The payload will include whether a user deleted, starred, or unstarred the repository. Look for these datapoint, find which event occurred, and post it in a channel.

Good luck! If you need any help, feel free to reach out to either of your mentors.





21 changes: 21 additions & 0 deletions week4/homework/responses/4.3-final-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ✔️Final Project

Congratulations, you are about to complete your final homework assignment! It's time for you to apply the concepts from this week into a project.

## 📃Specifications

1. Create an app that listens for Github issues and posts in the app's chat whenever an event occurs.
2. Listen for an app home opened event, and publish a view with all of the issues in a github repository

## 🤔Hints

- use ExpressReceiver, both the body-parser and axios
- enable App Home within your configurations
- Refer to [this link](https://slack.dev/bolt-js/concepts#publishing-views) on help with creating a view.

![](https://media.giphy.com/media/4JVTF9zR9BicshFAb7/giphy.gif)



This project is pretty challenging, so make sure to reach out to your mentors with any questions!

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.