1.0.0 • Published 4 years ago

@handyai/service-sdk v1.0.0

Weekly downloads
3
License
-
Repository
-
Last release
4 years ago

@handyai/service-sdk

Handy.ai Core Service SDK.

Documentation

To compile documentation run

$ yarn docs

or

$ npm run docs.

Then you can find it in docs/index.html

Example Usage (TypeScript)

import { HandyService } from "@handyai/service-sdk";

class MyService extends HandyService{
    public async processRequest (req: Request): Promise<Response> {
        return { error: false, payload: { message: "Hello, World!", user: req.user } };
    }
}

const service = new MyService();

service.listen();

Example Usage (JavaScript)

const { HandyService } = require("@handyai/service-sdk");

class MyService extends HandyService{
    public async processRequest (req) {
        return { error: false, payload: { message: "Hello, World!", user: req.user } };
    }
}

const service = new MyService();

service.listen();

Debugging Service

use environment variable DEBUG="handyai:*"

for example

$ env DEBUG="handyai:*" node index.js

1.0.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago