Here, we are going to build the stateless web application backend, and later on we will add the database. This application will allow users to create, read, update, and delete blog articles. Then we will deploy and test our little blog API.
Open the Atom text editor in the empty blog-app directory. Let's use the command line to create some files:
sls create -t aws-nodejs -n blog
I have used sls create to create a new service, but with a new name—blog.
This command line will generate two files, serverless.yml and handler.js, as shown in the following screenshot:
Open the serverless.yml file and delete some of the comments. Once that is done, the next thing you must do is change the region. Here, I am deploying my service in the Frankfurt region in eu-central-1, as follows:
service: blog
provider:
name: aws
runtime...