Introduction
Packhouse Introduction

為何採用Packhouse?
1. 統一開發格式
2. 建構微服務
3. 當我們無法使用TypeScript
4. Cloud Function
無伺服器架構 - Serverless
Serverless Framework
AWS Serverless Application
Install
運行環境
Node 8.x以上。
First Function
使用案例
Last updated
$ npm i packhouse --saveconst Packhouse = require('packhouse')
const packhouse = new Packhouse()
const group = {
tools: {
sum: {
handler: (self, v1, v2) => self.success(v1 + v2)
}
}
}
packhouse.addGroup('math', () => {
return {
data: group
}
})
packhouse
.tool('math/sum')
.promise(10, 20)
.then(result => console.log(result)) // 30