Skip to content

DataLeoZ/Node-File-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node File Server

This is a file server based on Node.js. It can help you serve static file, SPA or static site.

Node.js file system API: https://nodejs.org/api/fs.html

if you want to mapping any local folder in this server content, try:

ln -s ~/Documents docs(your folder path)  

Usage

run npm link use stript

npm link

Then you can use script to run this server

file-server [options]

Options:
      --version        Show version number                             [boolean]
  -p, --port           Set port                 [number] [default: 8000]
  -o, --host           Set host            [string] [default: "localhost"]
  -d, --showDirectory  Set is show Directory               [boolean] [default: true]
  -h                   Show help                                       [boolean]

Examples:
  file-server --port 8000 --host localhost

Features

  1. File reading ( 20+ Type Support )
  2. An interface for listing the directory's contents
  3. URL Decode
  4. Default Index
  5. Security Rule
  6. File Stream
  7. Catch Error
  8. Cache
  9. Command Script
  10. Local Debug