Skip to content

wiredawg/sfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple HTTPS Static File Server

This script serves a directory over HTTPS.

# Install the dependencies and the script
$ git clone git@github.com:wiredawg/sfs.git
$ cd sfs
$ npm install
$ cd ~/bin # Or somewhere in your $PATH
$ ln -s /path/to/sfs.js sfs

# Generate a self-signed HTTPS certificate
$ mkdir ~/.sfs && cd ~/.sfs
$ openssl -x509 -sha256 -newkey rsa:4096 -days 3650 -nodes -keyout key -out crt

# Setup passwd file for username and password
$ echo "{'name':'test', 'pass':'pass'}" > passwd
$ chmod -R go-rwx .

$ cd /path/to/content

# Serve the 'public' directory
$ sfs

# Serve a different directory on a different port
$ sfs.js --dir /path/to/your/stuff --port 8081

About

Simple HTTPS Static File Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published