Skip to main content

Overview

The service exposes two HTTP endpoints built with Hono framework.

GET /healthcheck

Health check endpoint to verify the service is running.

Request

/healthcheck
GET
No parameters required

Response

response
text/plain
Returns “Running!” with HTTP 200 status

Example

curl http://localhost:3000/healthcheck

Response Example

Running!

Source Code

server.ts (lines 6-8)
app.get("/healthcheck", (c) => {
  return c.text("Running!");
});

GET /get-rss-feed

Triggers the RSS feed processing workflow. Fetches the latest Shopify changelog entries, filters for new items, and sends them to Google Chat.

Request

/get-rss-feed
GET
No parameters required

Response

response
text/plain
Returns “Done!” with HTTP 200 status after processing completes

Behavior

This endpoint:
  1. Calls handleRSSFeed() to orchestrate the entire workflow
  2. Fetches RSS feed from https://shopify.dev/changelog/feed.xml
  3. Filters items newer than the last processed date (defaults to yesterday)
  4. Sends new items to Google Chat via webhook (if any exist)
  5. Returns after completion (synchronous processing)

Example

curl http://localhost:3000/get-rss-feed

Response Example

Done!

Error Handling

Error
Error
If WEBHOOK_URL is not set, the endpoint will throw:
Error: WEBHOOK_URL environment variable is not set
Error
Error
If the Google Chat webhook request fails:
Error: Failed to send to Gchat: {statusText} - {errorText}

Source Code

server.ts (lines 10-13)
app.get("/get-rss-feed", async (c) => {
  await handleRSSFeed();
  return c.text("Done!", 200);
});

Server Configuration

The server is built using Hono, a lightweight web framework for the edge.
server.ts
import { Hono } from "hono";
import { handleRSSFeed } from "./rss-handler.js";

const app = new Hono();

// ... endpoints defined above

export default app;

Running the Server

bun run server.ts

Build docs developers (and LLMs) love