Product
Introducing Ruby Support in Socket
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
generator-lambda-boilerplate
Advanced tools
A scaffold for a nodejs Serverless service, forked from acloud.guru
Be sure to enable CircleCI for this integration and to request @peterjcaulfield to add his own little @plnt9machine user to your project to allow it to automatically generate tags.
If you want to add a visual build status badge to your repo README you can use the following snippet:
[![Build status](https://circleci.com/gh/Plnt9/sls-name-of-your-lambda/tree/master.svg?style=shield&circle-token=<YOUR CIRCLE CI PROJECT TOKEN HERE>)](https://circleci.com/gh/Plnt9/sls-name-of-your-lambda)
Be sure to change the URLs with the real name of your project and to provide a valid Project Level token.
Also if you want to enable notification on our slack channel from Circle CI builds, go to your project settings and select Notifications > chat notifications
. Under slack add the following callback url:
https://hooks.slack.com/services/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
This boilerplate is ready to provide you some commands:
npm test
: run the linting and the unit tests for the current projectnpm run test:lint
: run only the lintingnpm run test:unit
: run only the unit testsnpm run build
: builds the current project into a self-deployable lambda packageTo test your lambda from your local machine you can execute the following from the build folder:
sls invoke local --function $handlerName --stage $stage --path ../event/$event.json
The $event.json
file is used to mock the event
argument that is passed in to your
handler.
Nothing really. Feel free to bootstrap a new discussion in case you think there's something missing here.
The boilerplate has async/await javascript functionality so the async code can be simplified More docs on the subject: https://ponyfoo.com/articles/understanding-javascript-async-await https://www.twilio.com/blog/2015/10/asyncawait-the-hero-javascript-deserved.html Example
function getAsyncData(param1, ...){
//returns a Promise
}
async AsyncAwaitFunction function(param1, ...) {
const asyncResult = await getAsyncData(param1, ...)
console.log(asyncResult)
}
FAQs
Basic boilerplate for lambdas at planet 9 energy
We found that generator-lambda-boilerplate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.