1.2.2 • Published 4 years ago

@theta-rpc/errors v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Installation

with npm:

npm install --save @theta-rpc/{core,common,errors,http-transport}

with yarn:

yarn add @theta-rpc/{core,common,errors,http-transport}

Simple usage

import { ThetaRPCFactory } from '@theta-rpc/core';
import { Procedure, Method } from '@theta-rpc/common';
import { HttpTransport, IHttpTransportOptions } from '@theta-rpc/http-transport';

@Procedure('machine')
class MachineMethods {
    
    @Method('sayHello')
    public sayHello() {
        return 'Hello!';
    }
}


ThetaRPCFactory.create<IHttpTransportOptions>({
    server: {
        transport: HttpTransport,
        transportOptions: {
            port: 8080,
            endpoint: '/json-rpc'
        }
    },
    procedures: [MachineMethods]
});

You can see other samples in the samples repository

Dependencies

PackageStatus
@theta-rpc/core
@theta-rpc/common
@theta-rpc/errors
@theta-rpc/http-transport
@theta-rpc/ws-transport
1.2.2

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

0.0.1

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.0

4 years ago