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

@serverlessui/cli

v0.12.0

Published

Serverless UI command-line utility for deploying serverless applications to AWS

Downloads

33

Readme

📖 CLI Reference

  1. deploy
  2. configure-domain

deploy

sui deploy

Options

| Option | Description | Default | | :-----------: | ----------------------------------------------------- | :-----------: | | --dir | The directory of your website's static files | "dist" | | --functions | The directory of the functions to deploy as endpoints | "functions" | | --prod | Custom Domains only: false will deploy a preview | false |

Note: The --dir directory should be only static files. You may need to run a build step prior to deploying

Examples

  • Deploy a preview of static website in a build directory with no functions
sui deploy --dir="build"
...
❯ Website Url: https://xxxxx.cloudfront.net
  • Deploy a preview of static website with serverless functions
sui deploy --dir="build" --functions="lambdas"
...
❯ Website Url: https://xxxxx.cloudfront.net
❯ API Url: https://xxxxx.cloudfront.net/api/my-function-name
❯ API Url: https://xxxxx.cloudfront.net/api/my-other-function-name
  • Production deploy

    Note: A custom domain must be configured for production deploys. See configure-domain

sui deploy --prod --dir="build" --functions="lambdas"
...
❯ Website Url: https://www.my-domain.com
❯ API Url: https://www.my-domain.com/api/my-function-name
❯ API Url: https://www.my-domain.com/api/my-other-function-name

configure-domain

This step only needs to be completed once, but it may take anywhere from 20 minutes - 48 hours to fully propogate

sui configure-domain [--domain]

Options

| Option | Description | Default | | :--------: | ------------------ | :-----: | | --domain | Your custom domain | None |

Additional Steps

A minute or two after running this command, the deploy will "hang" while trying to validate the domain prior to creating the wildcard certificate.

  1. Navigate to Route53

    Find your Hosted Zone and take note of the Zone Id and Name Servers

  2. Update the Nameservers on your Domain Registrar's website (eg. Namecheap)

  3. Wait

    The DNS resolution can be as quick as 10 minutes or take up to 48 hours. After some time, the Serverless UI command may timeout, but running it again should pick up where it left off.

  4. Navigate to Certificate Manager

    After the configure-domain command has completed successfully, navigate to Certificate Manager and take note of the Certificate Arn (eg. "arn:aws:acm:us-east-1:ACCOUNT_ID:certificate/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx")

  5. Create a Serverless UI config file

    Place the config file in the root of your project

    serverlessui.config.js

    module.exports = {
      domain: 'serverlessui.app',
      zoneId: 'Z10011111YYYYGGGRRR',
      certificateArn:
        'arn:aws:acm:us-east-1:ACCOUNT_ID:certificate/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx'
    }

License

Licensed under the MIT License.