This is the official Ruby client for Proc: Serverless web functions with superpowers.

Install

Install with gem install proc:

gem install proc

Usage

Connect to proc using an account secret or limited api key:

require "proc"

client = Proc.connect("{your-proc-authorization}")

Now you can call procs just like local code:

client.type.number.add.call(1, {value: 1});

=> 2

Build more complex behaviors by composing procs together:

time = client.time

composition = time.now >> time.format(string: "%A")

composition.call

=> "Tuesday"

Deploy custom endpoints instantly and call them from anywhere:

client.proc.create.call(name: "day_of_week", proc: composition)

client.self.day_of_week.call

=> "Tuesday"

Learn more at proc.dev. See you around!