Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 3.43 KB

local_development.md

File metadata and controls

55 lines (39 loc) · 3.43 KB

Local Development

Initial setup

Data

  1. Start up a Redis server.
  2. Set the host and port in the Redis configs at application.conf

Main servers

I use ngrok for a temporary local server, but you can use whatever you want.

These steps walk you through creating a Slack app for Kupo since Kupo is not a distributed app. It's up to the developer to host this, but if you do, please give credit where it's due!

The fun begins

Prerequisite (other than the above): you have already [set up a Slack workspace](../README.md#Setting up with Slack)

  1. Start up the server: in the code directory, run $ sbt run
  2. Install ngrok and run it:
 # assuming you're in the parent directory:
 $ ./ngrok http 9000 # runs on port 9000
  • This will start an ngrok server that'll forward requests to your local Kupo server. You should see something like this in your console:
      ngrok by @inconshreveable                                                                         (Ctrl+C to quit)
                                                                                                                                                                      
      Session Status                online                                                                                                                            
      Account                       Jasna (Plan: Free)                                                                                                                
      Version                       2.3.35                                                                                                                            
      Region                        United States (us)                                                                                                                
      Web Interface                 http://127.0.0.1:4040                                                                                                             
      Forwarding                    http://e1c2c7f7eaa3.ngrok.io -> http://localhost:9000                                                                             
      Forwarding                    https://e1c2c7f7eaa3.ngrok.io -> http://localhost:9000                                                                            
                                                                                                                                                                      
      Connections                   ttl     opn     rt1     rt5     p50     p90                                                                                       
                                    0       0       0.00    0.00    0.00    0.00   
  1. In the main code directory, run $ sbt run
  2. Follow the same instructions for [setting up a Slack workspace](../README.md#Setting up with Slack), replacing the domains with your https ngrok domain, e.g., https://e1c2c7f7eaa3.ngrok.io.

After initial setup

Assuming you use ngrok, since the domain is randomly generated at each boot-up:

  1. In the code directory, run $ sbt run (if not booted up already)
  2. Boot up ngrok again (if not booted up already)
  3. In https://api.slack.com -> (your app), update URLs for Event Subscriptions, Interactivity & Shortcuts, and OAuth & Permissions with your current ngrok domain