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

tlsd

v2.10.1

Published

A server for web app prototyping with HTTPS and Websockets

Downloads

28

Readme

tlsd

This is a node.js based webserver.

Features

- SSL/TLS magically via Greenlock
- Websockets built in
- Standardised Websockets/RPC protocol for front/back end communcations
- Utility command 'tlsd'
- Browser reload on src changes

Installing

There are 2 ways to use this:

  1. Install globally as CLI command "tlsd"
  2. Install locally to an existing project directory and executed with "npx tlsd"

Install Globally

npm install -g tlsd

You should how have a CLI command "tlsd"

tlsd

This way lets you run a project without having to have tlsd included in it.

Install Locally

npm install tlsd

The tlsd module should now be added to your local package.json file and you can run it this way:

npx tlsd

This way you can just use it to serve your local project in dev or production mode.

tlsd init

Creates empty scaffolding files for a project:

tlsd init my_project

This can then be tested by starting the server:

tlsd run dev my_project 12345 3

And then browsing to "http://localhost:12345". You should see the pages being delivered and a websocket connecting being established.

tlsd run dev

In dev mode, tlsd runs a plain HTTP server without TLS/SSL security. This is for local (your computer) development:

tlsd root_dir port_num log_level

All arguments are required

tlsd domain

Adds a domain to Greenlock for production.

tlsd domain example.com

tlsd version

Displays the current version of tlsd

Production Mode

In production mode, you must specify the dir containing links/dirs for domains to serve it will run on HTTP on 80 (redirecting to 443), HTTPS on 443, and magically generate certs and serve secure sites like nodes:

DOMAINS_ROOT=./my_domains [email protected] VERBOSITY=4  node tlsd.js

All env vars and arguments are required.

You must also add your domain to greenlock before running nodes or it won't be recognzied:

npx greenlock add --subject example.com --altnames example.com,www.example.com

Production mode serves files with Letsencrypt SSL certs magically.

The browser reload feature does not operate in production mode.