New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@ind.ie/https-server

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ind.ie/https-server

HTTPS server that uses nodecert

npmnpm
Version
1.0.2
Version published
Weekly downloads
2
-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

https-server

An HTTPS server that uses nodecert.

Design goals

  • ✔ Command-line app
  • To-do: Easy integration into Express
  • To-do: Seamless switch to using ACME/Let’s Encrypt in production

Installation

npm i -g @ind.ie/https-server

Note regarding port 443

The server is started on port 443 by default. This is on purpose as an overarching goal of https-server is to make your development environment mirror your production environment as closely possible to remove that complexity from the code you have to write.

However, you must have your system setup to allow Node (Linux) or your account (macOS) to bind to so-called “privileged” ports so that this works. I will automate this as part of the process in the future but, for the time being:

Linux

sudo setcap 'cap_net_bind_service=+ep' $(which node)

macOS

sudo touch /etc/authbind/byport/443
sudo chown $(whoami) /etc/authbind/byport/443
sudo chmod 755 /etc/authbind/byport/443

macOS instructions courtesy of Setup authbind on Mac OS by Steve Mu.

Usage

Commandline

https-server [folder-to-serve] [port]

Both arguments are optional. Currently, if you want to specify the port manually, you must also specify the folder-to-serve.

  • [folder-to-serve] defaults to . (the current directory)
  • [port] defaults to 443. (See note regarding port 443, above.)

If you do not already have TLS certificates, they will be created for you automatically using nodecert.

All dependencies will be installed automatically for you if they do not exist if you have apt, yum (untested), or pacman (untested) on Linux or if you have Homebrew or MacPorts (untested) on macOS.

Help wanted

I’ve currently only tested this on Pop!_OS 18.10 (Ubuntu-based distro). I can use your help to test this on other platforms:

  • Windows 64-bit (should work without requiring any dependencies)
  • Linux with yum
  • Linux with pacman
  • macOS with MacPorts

If you get a chance to try out https-server on the above platforms, please let me know how/if it works. Thank you.

FAQs

Package last updated on 25 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts