🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More
Socket
Book a DemoInstallSign in
Socket

statikk

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

statikk

Simple, secure static file server – serve any directory over HTTP

Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
100
-45.95%
Maintainers
1
Weekly downloads
 
Created
Source

Statikk NPM statikk package

A simple and secure server for static files.

There are two smart security defaults set:

  • Your .git files are not exposed. (Whereas ALL other simple http servers do expose this security concern (except serve))
  • The server isn't accessible outside of localhost. Other folks on your network won't be able to browse it via your internal IP.

Also, if you don't specify a port it'll be deterministically generated based on your working directory. :tada:

Command line usage

$ npm install -g statikk
$ cd ~/Sites/fidgetspin.xyz
$ statikk

Then head to http://localhost:XXXXX/ to see the contents of ./ served over HTTP.

Command line options

  • hidden: allow transfer of hidden files. Defaults to false
  • expose: expose server to hosts other than localhost. Defaults to false
  • port: custom port. If not specified, it'll use a port automagically based on process.cwd(). (So different projects use different ports!)
  • open: Open the hosted URL in your default browser. (Only supported on Mac OS!)

Examples

// Start server at http://localhost:9000 serving ./
$ statikk --port 9000

// Start server at http://localhost:60384 (perhaps) serving ~/Sites/project
$ statikk ~/Sites/project

// Start server at a deterministically-chosen port based on the working directory, and open the browser
$ statikk --open

History

This project is a fork of...

The original project doesn't correctly exclude all hidden files, which is why I've forked and republished. ~paul irish. june 2017.

Keywords

statik

FAQs

Package last updated on 23 Apr 2021

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