0.1.1 • Published 7 years ago

static-app-server v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

static-app-server

Usage | API

Serve static files via nodejs express. HTML requests will return a default HTML file, if the URL points to a location which not exists. Other file types respond 404, if the file is not present.

Usage

var options = { port: 8080, path: 'tests/dist/' };
var server = require("static-app-server")( [ options ] );

API

http.Server createServer( options )

Creates a Nodejs http.Server Object with the given options.

OptionDescriptionTypeDefault
portPort the server listen toint8080
pathPath to the static files to serve, relative to the execution directory.Stringdist
defaultFileDefault html response. Must be in path.String/index.html