@merrymake/service

4.0.0 • Public • Published

Typescript Service Library for Merrymake

This is the official Typescript service library for Merrymake. It defines all the basic functions needed to work with Merrymake.

Usage

Here is the most basic example of how to use this library:

import {
  merrymakeService,
  type PayloadBufferPromise,
  MIME_TYPES,
  replyToOrigin,
  Envelope,
} from "@merrymake/service";

async function handleHello(payloadBuffer: Buffer, envelope: Envelope) {
  let payload = payloadBuffer.toString();
  replyToOrigin(`Hello, ${payload}!`, MIME_TYPES.txt);
}

merrymakeService({
  handleHello,
});

Tutorials and templates

For more information check out our tutorials at merrymake.dev.

All templates are available through our CLI and on our GitHub.

Readme

Keywords

none

Package Sidebar

Install

npm i @merrymake/service

Weekly Downloads

2

Version

4.0.0

License

ISC

Unpacked Size

32.2 kB

Total Files

8

Last publish

Collaborators

  • thedrlambda