cyfs-service-helper
You can use this tool to quickly develop your dec service, which needs many use of cyfs-sdk-nightly.
This tool encapsulates some complex useage,such as decode request object and lock path and so on.
Usage
After your stack had online, you can get the 'stack' object.
Auto apply routers
import { ServiceLoader } from "cyfs-service-helper";
async function init() {
const service = new ServiceLoader(stack);
service.install(routers);
await service.start();
}
const routers: RouterObj = {
put: {
test: { reqPath: "/test", router: YourPutMethodRouter },
},
};
Handle request object