npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ts-lambda-kit

v1.0.4-beta

Published

aws lambda kit for making backend with NodeJS v18, TypeScript & SAM CLI

Downloads

23

Readme

ts-lambda-kit

PRs Welcome npm version

A quick-start kit to Build REST API's using Typescript, AWS Lambda & SAM CLI.

By running single command, you will get a production-ready TypeScript lambda application and fully configured on your machine. Our goal is to provide you with a very cool, opinionated architecture. It will provide you with things like generic functionalities for the lambda function and cool request handling support with Amazon API Gateway, AWS CloudFormation, and Amazon DynamoDB.

It makes things very easy when the question comes with build, and deploy. It has a strong focus on making sure everything is developer-friendly.

Requirements:

Quick Installation

To create a project, simply run:

npx ts-lambda-kit <project-name>

🥇 Cool! You are ready to make your amazing product.

🎯 I know you liked it. Please, give a star to the repository ⭐⭐⭐

Architecture

This project contains source code and supporting files for a serverless application that you can deploy with the SAM CLI. It includes the following files and folders.

  • src - Code for the application's Lambda function written in TypeScript.
  • events - Invocation events that you can use to invoke the function.
  • __tests__ - Unit tests for the application code.
  • serverless.yml - A template that defines the application's AWS resources.

The application uses several AWS resources, including Lambda functions and an API Gateway API. These resources are defined in the serverless.yaml file in this project. You can update the template to add AWS resources through the same deployment process that updates your application code.

Developer Guide

install awscliv2, aws-sam-cli, nodejs 18 (and make only for macOS and Linux) on your machine and ensure that your aws iam account is configured. the configuration profile should be located at ~/.aws/config, access credentials should be located at ~/.aws/credentials.

To build and deploy your application for the first time, run the following commands in your shell using makefile (only for macOS and Linux):

make install
make build

Before deployment, open the Makefile and add your AWS-configured profile name at the profile variable.

Wait, you may try this command on your terminal to check what is the name of your aws-configured profile:

aws configure list-profiles

Let's make it live:

make deploy

The 2nd command will build the source of your application. The 3rd command will package and deploy your application to AWS, with a series of prompts:

  • Stack Name: The name of the stack to deploy to CloudFormation. This should be unique to your account and region, and a good starting point would be something matching your project name.
  • AWS Region: The AWS region you want to deploy your app to.
  • Confirm changes before deploy: If set to yes, any change sets will be shown to you before execution for manual review. If set to no, the AWS SAM CLI will automatically deploy application changes.
  • Allow SAM CLI IAM role creation: Many AWS SAM templates, including this example, create AWS IAM roles required for the AWS Lambda function(s) included to access AWS services. By default, these are scoped down to minimum required permissions. To deploy an AWS CloudFormation stack which creates or modifies IAM roles, the CAPABILITY_IAM value for capabilities must be provided. If permission isn't provided through this prompt, to deploy this example you must explicitly pass --capabilities CAPABILITY_IAM to the sam deploy command.
  • Save arguments to samconfig.toml: If set to yes, your choices will be saved to a configuration file inside the project, so that in the future you can just re-run sam deploy without parameters to deploy changes to your application.

You can find your API Gateway Endpoint URL in the output values displayed after deployment.

🎯 For more information, please check out our details guide

Key Resources

See the AWS SAM developer guide for an introduction to SAM specification, the SAM CLI, and serverless application concepts.

Contributing

Contributions are more than welcome! We are excited to explore how we can create something truly remarkable together!

License

ISC © 2023