@loopback/example-rpc-server

An example RPC server and application to demonstrate the creation of your own custom server

Stats

StarsIssuesVersionUpdatedCreatedSize
@loopback/example-rpc-server
3,7333783.0.16 days ago3 years agoMinified + gzip package size for @loopback/example-rpc-server in KB

Readme

@loopback/example-rpc-server

An example RPC server and application to demonstrate the creation of your own custom server.

![powered-by-loopback]

Usage

  1. Install the new loopback CLI toolkit.
npm i -g @loopback/cli
  1. Download the "rpc-server" application.
lb4 example rpc-server
  1. Switch to the directory.
cd loopback-example-rpc-server
  1. Start the app!
npm start

Next, use your favorite REST client to send RPC payloads to the server (hosted on port 3000).

Request Format

The request body should contain a controller name, method name and input object. Example:

{
  "controller": "GreetController",
  "method": "basicHello",
  "input": {
    "name": "Janet"
  }
}

The router will determine which controller and method will service your request based on the given names in the payload.

Contributions

Tests

Run npm test from the root folder.

Contributors

See all contributors.

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.