Show More
Commit Commit message Age Author Refs
r7:ca3ca4f9fc58
Updated deps and linted
0
r6:a559b36d9342
Typo
ポール ウェッブ
0
r5:4d034192debb
Updated README
ポール ウェッブ
0
r4:e103210d6e85
1.0.2
ポール ウェッブ
0
r3:d3407e89c1cb
Updated README
ポール ウェッブ
0
r2:79d51661b17f
1.0.1
ポール ウェッブ
0
r1:f660a417b7f0
Updated README
ポール ウェッブ
0
r0:f505f2ae8167
Initial commit
ポール ウェッブ
0

@inc/here

A dependency-free server for single page apps

Here is a zero dependency static file server with history api fallback defaults to support rapid single page app development.

Forked from Luke Jacksonn's Servør because I just wanted a nice file server (and, quiet). No watching, no reloads.


Features

  • 🗂 Serve static content like scripts, styles, and images from a directory
  • 🖥 Reroute all non-file requests like / or /admin to a single file
  • ⏱ Install using npx and be running in the browser in ~1 second
  • 📚 Readable source code that encourages learning and contribution

Usage

Add @inc/here as a dev dependency using npm i @inc/here -D or run directly from the Terminal:

npx here <directory> <fallback> <port> <open flag> <verbose flag>
  • <directory> path to serve static files from (defaults to current directory .)
  • <fallback> the file served for all non-file requests (defaults to index.html)
  • <port> what port you want to serve the files from (defaults to 8080)
  • <open flag> if you want here to launch the site in your default browser, pass --open (defaults to false)
  • <verbose flag> if you want logging, pass --verbose (defaults to false)

Example usage with npm scripts in a project's package.json file:

{
  "scripts": {
    "start": "npx here www index.html 8080 --verbose"
  }
}