-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
51 lines (44 loc) · 1.5 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
service: backendServerless
frameworkVersion: "3"
useDotenv: true
provider:
name: aws
runtime: nodejs18.x
plugins:
# Serverless-webpack to transform typescript into js and to allow us to manage what
# gets added to the lambda function or not
- serverless-webpack
# Serverless-offline to emulate the lambda and api gateway setup locally and
# allow development and testing without internet. Pairs nicelly with serverless-webpack
- serverless-offline
custom:
serverless-offline:
httpPort: ${env:PORT}
lambdaPort: ${env:LAMBDA_PORT}
webpack:
webpackConfig: "webpack.config.js" # Name of webpack configuration file
includeModules: false # Node modules configuration for packaging
packager: "pnpm" # Packager that will be used to package your external modules
excludeFiles: ./**/*.test.ts # Provide a glob for files to ignore
functions:
api:
handler: src/app.handler
events:
- httpApi:
path: /
method: get
# Optional deployment packaging configuration
package:
# Directories and files to include in the deployed package
patterns:
- src/**
- "!.git/**"
- "!.travis.yml"
- "!.prisma/**"
- "!.tests/**"
# Package each function as an individual artifact (default: false)
individually: true
# Explicitly set the package artifact to deploy (overrides native packaging behavior)
# artifact: path/to/my-artifact.zip
# Automatically exclude NPM dev dependencies from the deployed package (default: true)
excludeDevDependencies: true