Skip to content

Instantly share code, notes, and snippets.

@linus-amg
Created January 17, 2017 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linus-amg/08325d6394b6e93aa46f49eed4b2c2b9 to your computer and use it in GitHub Desktop.
Save linus-amg/08325d6394b6e93aa46f49eed4b2c2b9 to your computer and use it in GitHub Desktop.
serverless yml restApi howto?
accounts:
handler: handler.accounts
events:
- http:
handler: setup
method: POST
path: account/setup
integration: lambda
cors: true
- http:
handler: login
method: POST
path: account/login
integration: lambda
cors: true
- http:
handler: profile
method: GET
path: account
integration: lambda
cors: true
- http:
handler: create
method: POST
path: accounts
integration: lambda
cors: true
@linus-amg
Copy link
Author

module.exports.accounts = {
  setup: function (event, context, cb) {},
  login: function (event, context, cb) {},
  profile: function (event, context, cb) {},
  create: function (event, context, cb) {},
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment