-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
39 lines (31 loc) · 996 Bytes
/
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
service:
name: aws-nodejs-typescript-xlsx
# Add the serverless-webpack plugin
plugins:
- serverless-webpack
- serverless-apigw-binary
custom:
apigwBinary:
types:
# Binary files will always be returned, no matter the Accept header of the request
# This is the easiest / must intuitive option
- '*/*'
# Binary files will be returned if the request has a 'Accept: xxxx' and you set the Content-Type to the same 'xxxx'
# e.g. $ curl -X GET https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/hello -H "Accept: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" --output test.xlsx
#- 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
provider:
name: aws
runtime: nodejs6.10
functions:
hello:
handler: handler.hello
events:
- http:
method: get
path: hello
xlsx:
handler: handler.xlsx
events:
- http:
method: get
path: xlsx