
The plugins section specifies which plugins to use. The service property specifies the service name, and the provider section details which service provider to use - in our case, AWS - and any configuration properties. The following is a simplified version of the YAML file with the serverless-offline plugin. The final step of our setup is to add the serverless-offline package we just installed to the YAML config file as a plugin. The handler.js file is an example handler that provides a “hello world” REST API function. The serverless.yml file is a YAML configuration file that describes our serverless application’s functions, resources, plugins, and other necessary config information. We now have a project containing the serverless.yml and handler.js files.
#Npm serverless offline install#
Then, install serverless offline into our project:

Let’s make a new folder for the project, and from within the folder, do the following:įirst, create a boilerplate serverless project to provide a template:Ĭreate -template aws-nodejs -name trendmicro

Now that the environment is almost ready, it’s time to initialize our project. Serverless framework installed with the following command: npm install serverless -g.

