Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 577 Bytes

File metadata and controls

23 lines (13 loc) · 577 Bytes

basic-auth-static-server

Usage npx basic-auth-static-server /path/to/your/static-website

Everything is based on environment variables. This works out of the box with heroku too!

No environment variables are needed for the static server to work.

In order to configure and use Basic Auth you need to set the following environment variables.

BASIC_AUTH_USERNAME

BASIC_AUTH_PASSWORD

STATIC_INDEX_FILE is optional, default is index.html

PORT is optional, default is 3000


Options:

--single Enables SPA mode by always serving your index file.