- yarn run/ npm start
- serverless deploy
If you want to deploy to different stage instead of using dev
- serverless deploy --stage "stage-name"
-
yarn add -D serverless-offline/ npm install serverless-offline --save-dev
-
Edit serverless.yml
-
add plugins: serverless-offline
-
add events under each function
... plugins: - serverless-offline functions: hello: handler: handler.hello events: - http: path: /hello method: get ...
-
-
serverless offline
使用 Node.js + serverless framework + AWS Lambda 打造可擴展、更穩定而且更經濟的架構 | by 李至青 | Visually Lab | Medium