Created
October 22, 2018 06:16
-
-
Save sagar-gavhane/153eabba4b56b3b6315fcff854b9f6b8 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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