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

@0x4447/strawberry

v1.0.4

Published

🍓This CLI will create a SSL domain redirection using CloudFront and S3 automatically for you.

Downloads

7

Readme

🍓 Strawberry

This CLI was create out of frustration after we struggled countless times to do a simple HTTPS redirect, for example from: https://example.com to https://www.example.com.

This is a straightforward action over a non-encrypted connection. However, trying to make it work over HTTPS is an entirely different story, since you need a server with a certificate that can establish a secure connection before the server can tells the browser where to go.

It's simple to do this with a regular server, but more complicated if working with serverless technologies, not to mention the certificate setup and management for such a simple task.

That's how Strawberry came to be. We actually use serverless technology to fight serverless technologies through the use of AWS S3 and AWS CloudFormation to handle this simple operation. Go figure...

Strawberry automatically creates the entire stack for you. All you have to do is provide some basic information, and leave the rest up to the CLI.

How to install

] sudo npm install -g @0x4447/strawberry

How to use

] strawberry -s source.example.com -d destination.example.com

Where to get help

] strawberry -h

What to expect

This CLI...

  • Creates an S3 bucket with redirect enabled to the destination domain
  • Creates a certificate for the source domain
  • Creates a CloudFront distribution with the new certificate
  • Configures Route 53 so the source domain points to CloudFront

WARNING: What if the certificate takes too long to validate? After 60 seconds, the app quits and prints out a detailed explanation of what your next steps should be. Take the time to thoroughly go over the printout, and you'll be good.

High-level flow looks like this:

  • User visit the source domain
  • A secure connection is established
  • CloudFront reads the S3 bucket configuration
  • The user is redirected to the destination domain

All of this is done through the use of SSL.

Credentials

To use this CLI, create a programmatic user or create a role with the following permissions:

  • AmazonS3FullAccess
  • CloudFrontFullAccess
  • AmazonRoute53FullAccess
  • AWSCertificateManagerFullAccess

Is deployment instant?

No, it's not. The following aspects don't happen right away:

  • SSL Certificate confirmation
  • CloudFront distribution

SSL Certificate confirmation

The timeframe for this process ranges from 10 seconds to 24 hours. It's completely unpredictable, and there's no way to speed up the process. Because of this, the app quits if the certificate isn't confirmed within 60 seconds. When that happens, go to the AWS Console to monitor the certificate.

CloudFront distribution

This takes up to 15 or 20 minutes, but when you reach this point, you can be certain that the configuration is correct. At this point, you just need to wait until the process is complete. Only then will the domain deliver the website.

The end

If you enjoyed this project, please consider giving it a 🌟. And check out our 0x4447 GitHub account, which contains additional resources you might find useful or interesting.

Sponsor 🎊

This project is brought to you by 0x4447 LLC, a software company specializing in building custom solutions on top of AWS. Follow this link to learn more: https://0x4447.com. Alternatively, send an email to [email protected].