Skip to content

Instantly share code, notes, and snippets.

@sagar-gavhane
Created October 22, 2018 06:14
Show Gist options
  • Save sagar-gavhane/79bc3a8257ba9faeca8d2bd2158de709 to your computer and use it in GitHub Desktop.
Save sagar-gavhane/79bc3a8257ba9faeca8d2bd2158de709 to your computer and use it in GitHub Desktop.
This code snippets is created during writting article on "Build a RESTful API with the Serverless Framework". article link is here => https://medium.com/@sgavhane70/build-a-restful-api-with-the-serverless-framework-d8cc548f8e0f
# serverless.yml
service: pokemon-service
provider:
name: aws
runtime: nodejs8.10
stage: dev
region: us-east-1
memorySize: 512
functions:
pokemonFunc:
handler: index.handler
events:
- http:
path: pokemon
method: get
- http:
path: pokemon/{id}
method: get
- http:
path: pokemon
method: post
- http:
path: pokemon/{id}
method: put
- http:
path: pokemon/{id}
method: delete
plugins:
- serverless-offline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment