如何使用无服务器框架和 openwhisk-php 部署 docsify?

时间:2021-03-13 14:01:28

标签: php aws-lambda serverless-framework docsify

我正在尝试使用 docsifyserverless 部署 openwhisk-php。但是,在部署时,我从无服务器中收到以下错误:

Serverless:  
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Compiling Functions...
 
 Serverless Error ----------------------------------------
 
  Function handler (index) does not exist.

我的 serverless.yml

service: openwhisk-php-simple

provider:
  name: openwhisk
  runtime: php
functions:
  my_function:
    handler: index
    runtime: php
plugins:
  - serverless-openwhisk

我的 index.php 只是一个简单的文件,其中包含运行 docsify 所需的 1 行代码:

<?php header( 'Location: /docs/' ) ;  ?>

那么,我做错了什么?有什么建议吗?

0 个答案:

没有答案