nss

nano-static-server

Simple static Node.JS server with no dependencies

Showing:

Popularity

Downloads/wk

1

GitHub Stars

3

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

1.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

#Simple static Node.JS server with no dependencies.

  • No dependencies
  • Supports cache by Last-Modified

###Custom config You can specify custom config by passing --cfg parameter:

nano-server --cfg=./path/to/config.json

Default config is:

{
  "host": "localhost",
  "port": 8888,
  "root": "public",
  "cacheControl": "public",
  "stubs": {
    "index": "index.html",
    "error": "error.html",
    "notFound": "404.html"
  },
  "mime": {
    ".html": "text/html",
    ".js": "application/x-javascript",
    ".css": "text/css",
    ".jpg": "image/jpeg",
    ".png": "image/png",
    "default": "text/plain"
  }
}

I think that there is no need to explain ;)

todo: tests

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100