Updating your Webhook Microservice

Stephan Smith
Mechanics of Search
2 min readOct 27, 2019

If you have changed your Takeshape content type, and are not seeing your changes in your Algolia index, then you need to update the query that handles the data push from Takeshape to Algolia.

The following are the steps you need to take to push your changes to Heroku.

Open your Command Line (CLI)

On your mac, you need to launch your Terminal (or ITerm2 if you have it installed). Go to the folder where you have your search engine repo.

Check for your Changes

Since your code is part of a git repo, you need to use git and its commands to commit your changes. Use the following command to see if you have changes.

> git status

Screen shot of the results of git status command.

Commit (Save to Git) your Changes

Now you need to add the changes in the webhook.js to git. This command will add the change or changes in this folder to git. Notice that the git status command above shows the changes file in red.

git add .
git commit -m “Your change message”

Push to Heroku

Now you need to push the changes to Heroku. The following command will push the ‘master’ branch to the heroku remote. This tells Heroku that you have changed the code and it needs to restart the microservice with your changes.

git push heroku

Now confirm that Heroku updated

If you want to confirm that heroku is running, you can use the heroku CLI to list the logs messages in you terminal. Use the following command to wathc the log messages. If you go back into Takeshape and edit one of your content elements, you will see the log message show in your terminal.

heroku logs -t

--

--

Stephan Smith
Mechanics of Search

Startup founder — Boston based full stack developer with a strong focus on rapid prototyping, server-less solutions, and testable code.