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

pwalauncher

v1.0.46

Published

The PWA launcher for react-declarative

Downloads

116

Readme

pwalauncher

The microservice bootstrap for PWA with serverless functions

Usage

npm install -g pwalauncher
pwalauncher # Will share `wwwroot` subfolder with static assets and redirect to `index.html` if 404

Benefits

  1. Free SSL Certificate obuse

Create a ZeroSSL 90-days sertificate for single domain and multiply it to several websites shared on different ports

  1. Port forward over SSL

Forwarding https://example.com/8081 to http://localhost:8081. Both websoket and http forwarding are supported

  1. JWT Validation for each forwarded port

While forwarding to http://localhost:8081 the pwalauncher can intercept Authorization: Bearer <token> header and validate the token. The UI can sign a token every 10 seconds to avoid DDOS

  1. CRA-like API proxy

Request to https://example.com/v1 can be forwarded to https://cloud.appwrite.io/v1

  1. Cors-everywhere like file download proxy

Fetch from https://example.com/cors/http://filedownload.com/demo.mp3 will download http://filedownload.com/demo.mp3 ignoring mixed content and cord origin policy

  1. Mutal SSL auth on a server side

A self-signed SSL certificate installed localy can be used to restrict access to application authorisation with second layer of authentification

Ecosystem

This tool is extreamly powerfull with PM2. The pm2 should be used for instantiation while pwalauncher used as easy-config reverse-proxy

pm2 start ecosystem.config.js
pm2 list
pm2 save
pm2 monit
pm2 stop service
pm2 kill

The tmux also can be used to start microservices in debug mode with direct stdin/stdout pipe

tmux kill-session
tmux
tmux attach
Ctrl + B + D
Ctrl + B + C
Ctrl + B + P
Ctrl + B + N

The pwalaunch used single argument if you want to use different name of config.

pwalaunch launcher.config.json

Configutation

const fs = require('fs');

module.exports = {
    ports: [
        8081,
        8082,
        8083,
        8084,
        8085,
        8086,
        8087,
        8088,
        8089,
        8090,
    ],
    proxy: [
        {
            path: 'v1',
            link: 'http://127.0.0.1:8080/v1'
        }
    ],
    ssl: {
        key: fs.readFileSync('./ssl/private.key', 'utf8'),
        cert: fs.readFileSync('./ssl/certificate.crt', 'utf8'),
    },
    sslPort: 444,
    sslVerify: true,
    jwtSecret: "TEST",
    cookieSecret: true, // { key: "test", value: "1", }
    cookieSecretAllowed: ['/', '/index.html', '/favicon.ico'],
    ipBlacklist: ["95.173.136.72"],
    port: 80,
    redirectHttps: false,
    wwwroot: "build"
};

Self-signed SSL Setup

If you getting trouble while trying to setup self-signed ssl, check the 3rdparty folder. The SSLCertificateMaker.exe will help you create root certificate (CA) for client devices and self-signed children (CERT) for the server. The CertTrustManager.exe will help you create a one-button setup file for root certificate (CA), to create that file right click on CertTrustManager window.

screenshot

P.S. If you choose wrong certificate in modal run chrome://restart to choose It again or use Edge