-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
43 lines (38 loc) · 1.02 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
# Serverless.yml is the configuration the CLI
# uses to deploy your code to your provider of choice
service: buefy-shop-serverless
# exclude the code coverage files and circle ci files
package:
exclude:
- coverage/**
- .circleci/**
# Use the serverless-webpack plugin to transpile ES6
plugins:
- serverless-webpack
- serverless-offline
- serverless-prune-plugin
# Configuration variables
custom:
secrets: ${file(secrets.json)}
prune:
automatic: true
number: 3
webpack:
includeModules: true
# The `provider` block defines where your service will be deployed
provider:
name: aws
runtime: nodejs12.x
region: eu-west-1
environment:
STRIPE_SECRET_KEY: ${self:custom.secrets.stripeSecretKey}
# The `functions` block defines what code to deploy
functions:
createCharge:
handler: functions/createCharge/createCharge.handler
# The `events` block defines how to trigger the handler.createCharge code
events:
- http:
path: charges
method: post
cors: true