<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/architect/assets.arc.codes/raw/main/public/architect-logo-light-500b%402x.png">
<img alt="Architect Logo" src="https://github.com/architect/assets.arc.codes/raw/main/public/architect-logo-500b%402x.png">
</picture>
## [`@architect/functions`](https://www.npmjs.com/package/@architect/functions)
> Runtime helper library for serverless apps built with [Architect][npm]
[![GitHub CI status](https://github.com/architect/functions/workflows/Node%20CI/badge.svg)](https://github.com/architect/functions/actions?query=workflow%3A%22Node+CI%22)
Check out the full docs: [arc.codes](https://arc.codes)
## Install
`npm i @architect/functions`
## Usage
```js
let {
events, // @events pub/sub
http, // @http middleware + tools
queues, // @queues pub/sub
services, // Architect resource / service discovery
static, // @static asset helper
tables, // @tables DynamoDB helper methods + API client
ws, // @ws WebSocket helper + API client
} = require('@architect/functions')
```
# API
**`@events` methods**
- [`events.subscribe()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.events.subscribe)
- [`events.publish()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.events.publish)
**`@http` methods**
- [`http()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.http)
- [`http.async()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.http.async)
- [`http.express()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.http.express)
- [`http.session()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.http.session)
**`@queues` methods**
- [`queues.subscribe()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.queues.subscribe)
- [`queues.publish()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.queues.publish)
**Service discovery**
- [`services()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.services)
**`@static` methods**
- [`static()`]([#static](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.static))
**`@tables` methods**
- [`tables()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table.delete()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table.get()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table.put()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table.query()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table.scan()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table.update()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table.reflect()`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table.name`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table._db`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
- [`table._doc`](https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.tables)
**`@ws` methods**
- [`ws.send()`](#https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.ws.send)
- [`ws.close()`](#https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.ws.close)
- [`ws.info()`](#https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.ws.info)
- [`ws._api`](#https://arc.codes/docs/en/reference/runtime-helpers/node.js#arc.ws.api)
没有合适的资源?快使用搜索试试~ 我知道了~
Architect应用程序的AWSLambda节点运行时助手___下载.zip
共101个文件
js:72个
md:9个
ts:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 170 浏览量
2023-04-18
00:19:45
上传
评论
收藏 98KB ZIP 举报
温馨提示
Architect应用程序的AWSLambda节点运行时助手___下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
Architect应用程序的AWSLambda节点运行时助手___下载.zip (101个子文件)
app.arc 232B
style.css 16B
.eslintignore 71B
.gitignore 122B
http-res-test.js 27KB
index-res-test.js 25KB
index-req-test.js 14KB
http-req-test.js 12KB
_res-fmt.js 7KB
dynamo-test.js 6KB
tables-test.js 5KB
body-parser-test.js 4KB
http-session-dynamo-test.js 4KB
http-session-jwe-test.js 4KB
publish.js 4KB
index-test.js 4KB
index.js 3KB
index.js 3KB
session-test.js 3KB
index.js 3KB
events-queues-test.js 3KB
factory.js 3KB
index.js 2KB
index-test.js 2KB
jwe.js 2KB
body-parser.js 2KB
http.js 2KB
subscribe-test.js 2KB
static-plain-test.js 2KB
subscribe.js 2KB
dynamo.js 2KB
index.js 2KB
static-fingerprinted-test.js 2KB
params.js 2KB
old.js 2KB
http-assets.js 1KB
index.js 1KB
index.js 1KB
binary-types.js 1KB
index.js 1KB
get-idx-test.js 1KB
subscribe-test.js 1KB
url-test.js 1KB
ws-test.js 1KB
create.js 1KB
factory-test.js 1KB
version-check.js 991B
_get-ports.js 887B
_sandbox-version.js 870B
index.js 860B
publish-test.js 711B
publish-test.js 711B
find.js 666B
index.js 606B
_sandbox-version-test.js 596B
index.js 590B
update.js 497B
url.js 488B
index.js 472B
index.js 435B
index.js 396B
read.js 349B
write.js 349B
index.js 301B
_get-idx.js 291B
index.js 289B
index.js 289B
index.js 284B
index.js 284B
csrf.js 259B
index.js 227B
_week-from-now.js 174B
index.js 162B
index.js 159B
index.js 123B
index.js 15B
package.json 2KB
mock-sns-event.json 662B
mock-sqs-event.json 505B
_changelog.md 31KB
readme.md 4KB
code_of_conduct.md 2KB
pull_request_template.md 1KB
bug_report.md 909B
feature_request.md 767B
contributing.md 694B
contributing.md 510B
publicfile.md 87B
mock-arc 1KB
mock-arc-fingerprint 1KB
mock-static 143B
.npmrc 19B
http.d.ts 3KB
index.test-d.ts 3KB
tables.d.ts 2KB
events.d.ts 881B
ws.d.ts 722B
index.d.ts 515B
static.d.ts 134B
util.d.ts 60B
共 101 条
- 1
- 2
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功