Skip to content

ts 打包到 dist 目录下如何部署,node_modules 怎么处理。带带弟弟🥺 #81

@0jinxing

Description

@0jinxing

项目结构

.
├── dist
│   ├── index.js
│   ├── mail.js
│   ├── notion.js
│   └── parser.js
├── node_modules
├── package.json
├── serverless.yml
├── src
│   ├── index.ts
│   ├── mail.ts
│   ├── notion.ts
│   └── parser.ts
├── tsconfig.json
└── yarn.lock

serverless.yaml

name: my-bills
component: scf

inputs:
  src: ./
  handler: index.main_handler
  region: ap-guangzhou
  runtime: Nodejs10.15
  memorySize: 128
  timeout: 3
  type: event
  events:
    - timer:
        name: timer
        parameters:
          cronExpression: "0 0 6 * *"
          enable: true

疑问🤔️

  1. 需要执行函数 在 dist/index.main_handler。配置里面 handler 需要怎么样才能加上文件夹?
  2. node_modules 需要上传吗。需要的话 怎样配置比较合适?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions