Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (46 sloc) 1.21 KB
# Welcome to serverless. Read the docs
# https://serverless.com/framework/docs/
# Serverless.yml is the configuration the CLI
# uses to deploy your code to your provider of choice
# The `service` block is the name of the service
service: serverless-auth
plugins:
- serverless-offline
# Configuration variables
custom:
secrets: ${file(secrets.json)}
# The `provider` block defines where your service will be deployed
provider:
name: aws
runtime: nodejs6.10
profile: personal
region: ap-southeast-1
environment:
JWT_SECRET: ${self:custom.secrets.jwtSecret}
# The `functions` block defines what code to deploy
functions:
login:
handler: functions/login.handler
events:
- http:
path: sessions
method: post
cors: true
authorize:
handler: functions/authorize.handler
getCats:
handler: functions/getCats.handler
events:
- http:
path: cats
method: get
cors: true
# authorizer: authorize # Cats are public
getPangolins:
handler: functions/getPangolins.handler
events:
- http:
path: pangolins
method: get
cors: true
authorizer: authorize # Pangolins are protected