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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kagariet01/simple_https_server

v1.3.0-patch1

Published

A simple HTTPS server implementation in TypeScript

Readme

simple https server

使用 TypeScript 撰寫的簡單 HTTPS 伺服器,讓你能快速建立一個 HTTPS 伺服器。

如何編譯

直接編譯成 .js 檔案

使用如下指令,它會自動安裝必要的套件並編譯 TypeScript 檔案

npm run build

如何安裝並在自己的專案使用

推薦 使用 npm link 來連結本地開發版本

如果你正在開發或修改這個套件,可以使用 npm link 來在其他專案中連結到這個套件。

# 在此專案目錄中建立全域連結
npm link
# 在其他專案中連結到此套件
npm link simple-https-server

# 解除此專案的連結
npm unlink
# 在其他專案中解除連結
npm unlink simple-https-server

打包成 .tgz 檔案

使用 npm pack 來打包成 .tgz 檔案,這樣可以方便地在其他專案中安裝。

npm pack

你可以在其他地方使用這個 .tgz 檔案來安裝這個套件。

npm install <output .tgz file>

不建議 土方法:直接複製 srcdist 目錄

如果你只是想快速測試,也可以直接複製 srcdist 目錄到你的目標專案中。
除非你有特別的需求,否則不建議這樣做,因為...~~太土了~~。

使用方法

以下是最基本的使用方法配註解

import HTTPSServer from "simple-https-server";

const server=new HTTPSServer(); // 建立一個伺服器的實例
server.port=8082; // 設定伺服器的埠號
server.app_path="docs"; // 設定網頁應用的路徑,你可以把網頁用到的檔案放在這個目錄下

// 啟動伺服器
try{
	server.start(); // 啟動伺服器
}catch(error){
	console.error('啟動伺服器時發生錯誤:',error);
}