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

create-serverless-api

v0.4.9

Published

Create aws serverless api infra through OpenAPI Specification for beginners.

Downloads

89

Readme

Create Serverless API

Create Serverless APIs with no infra configuration.

It is an aws serverless-based backend api template created for beginners.

You can service api without knowing the cloud infrastructure.

And Create Serverless API works on macOS, Windows, and Linux.

Create Serverless API was inspired by the create-react-app.

🚀Quick Overview

📌 Before we proceed with the work below, you must set aws credential

```
npx create-serverless-api my-api
cd my-api
npm bootstrap
npm deploy
```

And check the API document URL and API endpoint at the terminal.

You will have a fully operational api service.

For detail, please refer to the explanation below.

✨Feature

  • Automatic aws infrastructure completion through documents in the OpenAPI specification.
  • Install only essential packages for each API.

Detail Feature

👍 The detail feature roughly say that this package is very cool.

  • Infrastructure distribution through IaC makes it easy to modify.
  • Using FaaS, monitoring is easy and stability can be obtained by horizontal expansion.
  • Supports monitoring and logging with aws X-ray and aws CloudWatch.
  • Babel settings are set for using typescript.
  • Can execute local test similar to the aws lambda.
  • Swagger api documents are automatically serviced on the web.

Environment in Lambda Container

✅ You can customize this.

  • Node 14.x

Detail Usage

  • ⚠ Caution

    Following this usage, your api will be serviced as a cloud service. You spend money according to the amount of api calls. so make sure to check out AWS Pricing Policy.

  1. Login to aws console

  2. Make iam user through aws IAM users.

    • Need Access key credential type.
    • Recommend AdministratorAccess policy through the attachment policies directy button for easy work.
    • Save the access key ID and secret access key that came out like that.
  3. Configurate your aws credentials file

    Windows default path: C/Users/{userName}/.aws/credentials

    Linux or macOS default path: ~/.aws/credentials

    [development]
    aws_access_key_id={your_aws_access_key_id}
    aws_secret_access_key={your_aws_secret_access_key}
    
    [production]
    aws_access_key_id={your_aws_access_key_id}
    aws_secret_access_key={your_aws_secret_access_key}

    📌 If you want to change the name, please change it with the script of package.json

  4. Creating an API

    npx create-serverless-api my-api
  1. Go the project directory.

    cd my-api
  1. Bootstrap for aws deployment.

    // Development
    npm run bootstrap
    
    // Production
    npm run bootstrap-prod
  2. Deploy to aws

    ✅ The api is served on the address output to the terminal, so make sure to save it.

    // Development
    npm run deploy
    
    // Production
    npm run deploy-prod
  • Local execute

    npm run offline
  • Destroy the api

    // Development
    npm run destroy
    
    // Production
    npm run destroy-prod
  • src directory tree description

    /your-project
    └─src
      ├─api
      │ └─...
      └─modules
        ├─...
    • api

      Directory where the entry point of your API is saved.

      The position should be placed in the x-cdk-lambda-handler of swagger.yaml.

    • api

      A directory that puts the code that we use in common.

👏 Contributing

Pull requests and 🌟 stars are always welcome.

For major changes, please open an issue first to discuss what you would like to change.

☕ Donate

  • Please buy me coffee so that I can continue to make convenient packages.

    https://www.buymeacoffee.com/awmaker

📩 Contact

[email protected]

Others

👍 We recommend third-party services that suit the characteristics of serverless services.

  • We recommand Dash Bird service for watch lambda infomations.
  • We recommand Planet Scale service for database server.