June 2018
Intermediate to advanced
184 pages
3h 28m
English
Alright. Let's create some more functions.
First, I will create or specify the functions that I want to have. I'm going to create an API for reading articles, for updating articles, and for deleting articles, as shown in the following screenshot:
readArticle: handler: articles/read.handler events: - http: path: articles method: getupdateArticle: handler: articles/update.handler events: - http: path: articles method: putdeleteArticle: handler: articles/delete.handler events: - http: path: articles method: delete
You also need to create the files. Create three separate files under the articles files serverless.js, read.js, and update.js.
Now, let's go back to the create.js file, copy the code, and paste it into the ...
Read now
Unlock full access