sc-endpoints
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

sc-endpoints

Module for creating socketcluster receivers and procedures by using classes and decorators.

@RegisterProcedure()
@AuthToken({type: 'user'})
@Data({
    type: 'object',
    properties: {
        content: {
            type: 'string',
            minLength: 10
        }
    }
})
class SendMessaageEndpoint implements Procedure {
    handle(socket: AGServerSocket,data: {email: string}, resp: Response) {
        resp.end()
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i sc-endpoints

Weekly Downloads

0

Version

0.1.7

License

MIT

Unpacked Size

35.5 kB

Total Files

45

Last publish

Collaborators

  • lucacode