and how to implement it?
# prisma-whats-new
d
and how to implement it?
i
If you are using serverless (AWS Lambda, GCS Functions, Microsoft Azure), you’ll want a
.yml
or
.yaml
file that points to those functions with other relevant info
Also, I am assuming this is a method inside of a
class
, yes?
(Makes no difference, though. Methods are just functions belonging to a
class
, so either way, it’s still a function)
Example:
Copy code
service: NAME_OF_YOUR_APP

provider:
  name: aws
  runtime: nodejs8.0

functions:

  create:
    handler: airlines/add.addAirline
    events:
      - http:
          path: airlines
          method: post
          cors: true
^ Pretty sure I screwed something up there but programming in Slack is a bit hard… Probably should have just used an editor. But you get the idea. Your
path
,
events
, etc are going to be different from what I wrote