Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
vandium
Advanced tools
Changelog
6.1.0 (2020-02-13)
New:
authorization()
in api()
handlers.Readme
AWS Lambda framework for building functions using Node.js for API Gateway, IoT applications, and other AWS events.
Install via npm.
npm install vandium --save
Vandium creates event specific handlers to reduce the amount of code than one
needs to maintain. The following handler code will respond with a message when
executed using the AWS API Gateway with a GET
request:
const vandium = require( 'vandium' );
// handler for an api gateway event
exports.handler = vandium.api()
.GET( (event) => {
// return greeting
return 'Hello ' + event.pathParmeters.name + '!';
});
The framework can process asynchronous responses using promises. The following code returns a User object from a datastore asynchronously:
const vandium = require( 'vandium' );
// our datastore access object
const Users = require( './users' );
// handler for an api gateway event
exports.handler = vandium.api()
.GET()
.validation({
pathParmeters: {
name: 'string:min=1,max=100,required'
}
})
.handler( async (event) => {
// returns a promise that resolves the User by name
return await Users.getUser( event.pathParmeters.name );
});
Additionally, resources can be closed at the end, success or failure, of the handler. Failure to close resources might cause the lambda function to timeout or run for longer than is required. The following code demonstrates closing a cache after the handler has been called:
const vandium = require( 'vandium' );
// our datastore access object
const Users = require( './users' );
// object caching - automatically connects on first access
const cache = require( './cache' );
// handler for an api gateway event
exports.handler = vandium.api()
.GET((event) => {
// returns a promise that resolves the User by name
return Users.getUser( event.pathParmeters.name );
})
.finally( () => {
// returns a promise that closes the cache connection
return cache.close();
});
Vandium supports the following types of AWS Lambda events:
For documentation on how to use vandium in your project, please see our documentation page.
We'd love to get feedback on how to make this tool better. Feel free to contact us at feedback@vandium.io
FAQs
AWS Lambda framework for building functions using Node.js for API Gateway, IoT applications, and other AWS events
The npm package vandium receives a total of 572 weekly downloads. As such, vandium popularity was classified as not popular.
We found that vandium 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.