Skip to content

Instantly share code, notes, and snippets.

@kovagoz
Last active June 21, 2018 21:38
Show Gist options
  • Save kovagoz/2da8890411dafa10e8ebb01d4f71de62 to your computer and use it in GitHub Desktop.
Save kovagoz/2da8890411dafa10e8ebb01d4f71de62 to your computer and use it in GitHub Desktop.
Static HTML endpoint for the AWS APIG with Serverless Framework
functions:
HelloWorld:
handler: dummy.handler # reference to a nonexistent handler
events:
- http:
path: /hello
method: get
integration: mock
request:
passThrough: NEVER
template:
application/json: '{ "statusCode" : 200 }'
response:
statusCodes:
200:
pattern: ''
headers:
Content-Type: "'text/html'"
template: '<h1>It works!</h1>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment