@midwayjs/serverless-scf-starter
本模块用于包裹无法定制运行时的 FaaS 平台,比如腾讯云 SCF。
Last updated 5 years ago by czy88840616 .
Original npm · Tarball · package.json
$ npm install @midwayjs/serverless-scf-starter 
SYNC missed versions from official npm registry.

Serverless SCF starter

本模块用于包裹无法定制运行时的 FaaS 平台,比如腾讯云 SCF。

腾讯云 SCF

import { asyncWrapper, start } from '@midwayjs/serverless-scf-starter';

let runtime;
export.init = asyncWrapper(async () => {
  runtime = await start();
});

// for web request
export.handler = asyncWrapper(async (...args) => {
  return runtime.asyncEvent(async function(ctx) {
    return 'hello world';  // ctx.body = 'hello world';
  })(...args);
});

// for event
export.handler = asyncWrapper(async (...args) => {
  return runtime.asyncEvent(async function(ctx, event) {
    return {data: 1};
  })(...args);
});

Current Tags

  • 3.0.0-alpha.42                                ...           alinode-stable (3 years ago)
  • 3.0.0-alpha.43                                ...           alpha (3 years ago)
  • 3.4.0-beta.12                                ...           beta (2 years ago)
  • 1.0.6-alpha.523                                ...           canary (4 years ago)
  • 3.4.0                                ...           latest (2 years ago)

148 Versions

  • 3.4.0                                ...           2 years ago
  • 3.4.0-beta.12                                ...           2 years ago
  • 3.4.0-beta.11                                ...           2 years ago
  • 3.4.0-beta.10                                ...           2 years ago
  • 3.4.0-beta.9                                ...           2 years ago
  • 3.4.0-beta.8                                ...           2 years ago
  • 3.4.0-beta.7                                ...           2 years ago
  • 3.4.0-beta.6                                ...           2 years ago
  • 3.4.0-beta.5                                ...           2 years ago
  • 3.4.0-beta.4                                ...           2 years ago
  • 3.4.0-beta.3                                ...           2 years ago
  • 3.4.0-beta.2                                ...           2 years ago
  • 3.3.5                                ...           3 years ago
  • 2.14.8                                ...           3 years ago
  • 3.1.6                                ...           3 years ago
  • 3.1.5                                ...           3 years ago
  • 3.0.4                                ...           3 years ago
  • 3.0.4-beta.1                                ...           3 years ago
  • 3.0.2                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 3.0.0-beta.17                                ...           3 years ago
  • 2.14.4                                ...           3 years ago
  • 3.0.0-beta.16                                ...           3 years ago
  • 3.0.0-beta.14                                ...           3 years ago
  • 3.0.0-beta.13                                ...           3 years ago
  • 3.0.0-beta.12                                ...           3 years ago
  • 3.0.0-beta.11                                ...           3 years ago
  • 3.0.0-beta.10                                ...           3 years ago
  • 3.0.0-beta.9                                ...           3 years ago
  • 3.0.0-beta.8                                ...           3 years ago
  • 3.0.0-beta.7                                ...           3 years ago
  • 3.0.0-beta.6                                ...           3 years ago
  • 3.0.0-beta.5                                ...           3 years ago
  • 3.0.0-beta.4                                ...           3 years ago
  • 3.0.0-beta.3                                ...           3 years ago
  • 3.0.0-beta.2                                ...           3 years ago
  • 3.0.0-beta.1                                ...           3 years ago
  • 2.13.3                                ...           3 years ago
  • 3.0.0-alpha.43                                ...           3 years ago
  • 3.0.0-alpha.42                                ...           3 years ago
  • 3.0.0-alpha.29                                ...           3 years ago
  • 3.0.0-alpha.41                                ...           3 years ago
  • 2.13.2                                ...           3 years ago
  • 2.12.9                                ...           3 years ago
  • 3.0.0-alpha.6                                ...           3 years ago
  • 3.0.0-alpha.2                                ...           3 years ago
  • 3.0.0-alpha.1                                ...           3 years ago
  • 2.11.4                                ...           3 years ago
  • 2.11.3                                ...           3 years ago
  • 2.11.2                                ...           3 years ago
  • 2.11.1                                ...           3 years ago
  • 2.10.14                                ...           4 years ago
  • 2.10.13                                ...           4 years ago
  • 2.10.12                                ...           4 years ago
  • 2.10.10                                ...           4 years ago
  • 2.10.7                                ...           4 years ago
  • 2.10.0                                ...           4 years ago
  • 2.10.0-beta.4                                ...           4 years ago
  • 2.10.0-beta.3                                ...           4 years ago
  • 2.10.0-beta.2                                ...           4 years ago
  • 2.8.13                                ...           4 years ago
  • 2.8.11                                ...           4 years ago
  • 2.8.9                                ...           4 years ago
  • 2.8.2                                ...           4 years ago
  • 2.7.7                                ...           4 years ago
  • 2.7.4                                ...           4 years ago
  • 2.7.0                                ...           4 years ago
  • 2.6.8                                ...           4 years ago
  • 2.6.7                                ...           4 years ago
  • 2.6.6                                ...           4 years ago
  • 2.6.5                                ...           4 years ago
  • 2.6.4                                ...           4 years ago
  • 2.6.3                                ...           4 years ago
  • 2.6.2                                ...           4 years ago
  • 2.6.1                                ...           4 years ago
  • 2.5.0                                ...           4 years ago
  • 2.4.0                                ...           4 years ago
  • 1.2.9                                ...           4 years ago
  • 1.2.8                                ...           4 years ago
  • 1.2.7                                ...           4 years ago
  • 1.2.2                                ...           4 years ago
  • 1.1.8                                ...           4 years ago
  • 1.1.4                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.11                                ...           4 years ago
  • 1.0.8                                ...           4 years ago
  • 1.0.7                                ...           4 years ago
  • 1.0.6-alpha.523                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 0.3.7                                ...           4 years ago
  • 0.3.5                                ...           4 years ago
  • 0.3.2                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.99                                ...           4 years ago
  • 0.2.97                                ...           4 years ago
  • 0.2.95                                ...           5 years ago
  • 0.2.92                                ...           5 years ago
  • 0.2.92-beta.1                                ...           5 years ago
  • 0.2.90                                ...           5 years ago
  • 0.2.89                                ...           5 years ago
  • 0.2.88                                ...           5 years ago
  • 0.2.86                                ...           5 years ago
  • 0.2.81                                ...           5 years ago
  • 0.2.76                                ...           5 years ago
  • 0.2.75                                ...           5 years ago
  • 0.2.74                                ...           5 years ago
  • 0.2.73                                ...           5 years ago
  • 0.2.72                                ...           5 years ago
  • 0.2.65                                ...           5 years ago
  • 0.2.64                                ...           5 years ago
  • 0.2.63                                ...           5 years ago
  • 0.2.61                                ...           5 years ago
  • 0.2.59                                ...           5 years ago
  • 0.2.55                                ...           5 years ago
  • 0.2.49                                ...           5 years ago
  • 0.2.27                                ...           5 years ago
  • 0.2.22                                ...           5 years ago
  • 0.2.19                                ...           5 years ago
  • 0.2.17                                ...           5 years ago
  • 0.2.16                                ...           5 years ago
  • 0.2.15                                ...           5 years ago
  • 0.2.10                                ...           5 years ago
  • 0.2.4                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.12                                ...           5 years ago
  • 0.1.11                                ...           5 years ago
  • 0.1.10                                ...           5 years ago
  • 0.1.9                                ...           5 years ago
  • 0.1.8                                ...           5 years ago
  • 0.1.7                                ...           5 years ago
  • 0.1.6                                ...           5 years ago
  • 0.1.5                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
  • 0.0.10                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE