Next we need to give our local server access to the internet so our slack app can communicate with it
ngrok is a tool that allows developers to create “tunnels” that connect the server running locally (i.e. on your computer) to the internet
In a new command line tab run the following command (make sure you run this within the project folder)
$ ngrok http 3000
Here, we are are telling ngrok to create a local tunnel that connects our server running on port 3000 (i.e. http://localhost:3000
) and to ngrok url that is accessible to the internet
You ngrok command should display output that looks similar to the following (the urls will be unique to your server and will not match the output below):
At this point in the project, you will want to have multiple tabs open in your command line application. In order for the Slack to be able to communicate with our server both our local server and ngrok must be running in their own separate tabs.
Copy the ngrok “forwarding” url (from our ngrok tab) that begins with https and paste it into the address bar of a new browser tab
Confirm that the welcome message is successfully displayed when using the ngrok url to access your server