Install Now

What is Membrane?

Stateful serverless TypeScript for internal tools.

FEATURES
EXAMPLES
example github action alert
Example of a Membrane program to checks if a Github workflow job has failed, and if so, it sends a sms message with information about the failure.
Use the Endpoint function to receive webhooks
SMS notification
import { nodes, root, state } from "membrane";

export async function endpoint({ path, body }) {
  switch (path) {
    case "/webhook":
      {
        const { action, workflow_job, repository } = JSON.parse(body);
        if (
          action === "completed" &&
          workflow_job.conclusion === "failure"
        ) {
          const message = 
           `The workflow "${workflow_job.workflow_name}" 
            in the repository "${repository.full_name}"
            was canceled due to a failure caused by 
            "${workflow_job.name}".`;

          await nodes.sms.send({ message });
        }
      }
      return JSON.stringify({ status: 200 });
    default:
      console.log("Unknown Endpoint:", path);
  }
}
   

What is Membrane?

Stateful serverless TypeScript for internal tools.

FEATURES
EXAMPLES
Example of a Membrane program to checks if a Github workflow job has failed, and if so, it sends a sms message with information about the failure.
Use the Endpoint function to receive webhooks
SMS notification
import { nodes, root, state } from "membrane";

export async function endpoint({ path, body }) {
  switch (path) {
    case "/webhook":
      {
        const { action, workflow_job, repository } = JSON.parse(body);
        if (
          action === "completed" &&
          workflow_job.conclusion === "failure"
        ) {
          const message = 
           `The workflow "${workflow_job.workflow_name}" 
            in the repository "${repository.full_name}"
            was canceled due to a failure caused by 
            "${workflow_job.name}".`;

          await nodes.sms.send({ message });
        }
      }
      return JSON.stringify({ status: 200 });
    default:
      console.log("Unknown Endpoint:", path);
  }
}
   
Features Walkthrough
In this video we discuss 3 of the most important features of Membrane: Durability, The Graph, and Observability.
Clickable poster of the Features Walkthrough video
Communication


Enter your email for occasional updates