Home - spospordo/espresso-api GitHub Wiki

Workflow Overview

The Server.js file handles the Get and Post commands to update the espresso recipe values in its json text file. When a Post is triggered, it will:

  1. Trigger to generate an HTML file with all recipe values hardcoded, provide direct link to images, and strip out any script. This file can be uploaded later anywhere and display correct data despite not needing connection to server.js file
  2. Trigger to generate a jpeg image of the website.
  3. Trigger to FTP the HTML output file or jpeg image to another location.
  4. Trigger to post the HTML output file or jpeg image to a github pages site.

I built a dashboard in home assistant to send Post commands to the server.js file to update all fields.

The Server.js only triggers those 4 actions when a Post command is handled. This ensures they are only used if there are any changes to an espresso recipe.