0.1.6 • Published 4 years ago

wayland v0.1.6

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

wayland

Wayland the Smith is a legendary master blacksmith, described by Jessie Weston as "the weird and malicious craftsman, Weyland"

wayland the module creates protobuf apps and client libraries with gRPC

Usage

const wayland = require('wayland')

const app = wayland.makeApp({
  host: 'localhost',
  port: 3000,
  protopath: 'hello.proto',
  services: {
    HelloService: {
      greet: (_, cb) => cb(null, { text: 'hello' })
    },
  },
})

app.start() // > Server running at localhost:3000
// or overwite the host, port, or app name
app.start({
  name: 'welund',
  host: '127.0.0.1',
  port: 3001,
}) // > welund running at 127.0.0.1:3001

const client = wayland.makeClient({
  host: 'localhost',
  port: 3000,
  protopath: 'hello.proto',
  service: 'HelloService',
})

client.greet({}, (err, greeting) => {
  // => ({ text: 'hello' })
})

Docs

https://github.com/pseudomuto/protoc-gen-doc

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

5 years ago

0.1.2

5 years ago