DEV Community

Subhankar De
Subhankar De

Posted on • Edited on

Serverless Framework Template

Serverless Framework Template - ES6/ES7 Compatible

This Github project template will standardize

  • Consistent src folder structure across multiple projects.
  • serverless-bundle plugin: Optimally packages your ES6 or TypeScript Node.js Lambda functions with sensible defaults so you don't have to maintain your own Webpack configs.
  • serverless-pseudo-parameters plugin: Allows you to take advantage of CloudFormation Pseudo Parameters.

Getting started

sls create --name <YOUR_PROJECT_NAME> --template-url https://github.com/subhankarde/serverless-nodejs-es7-template.git
cd YOUR_PROJECT_NAME
npm install
Enter fullscreen mode Exit fullscreen mode

The latest version of Webpack is not compatible. Please use the below version. Please be aware that AWS-SDK is in the DEV dependencies. Please move it to dependencies for PROD. AWS Lambda will use the latest SDK for the current template.

Latest npm packages

npm i -g npm-check-updates
ncu -u
npm install
Enter fullscreen mode Exit fullscreen mode

Webpack version

npm uninstall webpack
npm install --save-dev webpack@4.46.0
Enter fullscreen mode Exit fullscreen mode

VS Code command for Mac

code .
Enter fullscreen mode Exit fullscreen mode

Top serverless plugins

  • serverless-offline
  • serverless-step-functions
  • serverless-plugin-canary-deployments
  • serverless-dynamodb-local

Top comments (0)