diff --git a/handler.js b/handler.js deleted file mode 100644 index ed6be6c..0000000 --- a/handler.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports.hello = async (event, context) => { - return { - statusCode: 200, - body: JSON.stringify({ - message: 'Go Serverless v1.0! Your function executed successfully!', - input: event, - }), - }; - - // Use this code if you don't use the http event with the LAMBDA-PROXY integration - // return { message: 'Go Serverless v1.0! Your function executed successfully!', event }; -}; diff --git a/serverless.yml b/serverless.yml index e7fd6c2..bde8879 100644 --- a/serverless.yml +++ b/serverless.yml @@ -20,6 +20,7 @@ service: eg-api # NOTE: update this with your service name provider: name: aws runtime: nodejs8.10 + region: us-east-2 # you can overwrite defaults here # stage: dev @@ -56,7 +57,11 @@ provider: functions: hello: - handler: handler.hello + handler: handlers/hello/get.hello + events: + - http: + path: hello + method: get # The following are a few example events you can configure # NOTE: Please make sure to change your handler code to work with those events @@ -102,3 +107,6 @@ functions: # NewOutput: # Description: "Description for the output" # Value: "Some output value" + +plugins: + - serverless-offline \ No newline at end of file