Run http-server
Bazel

Run http-server


http_server

http_server(templated_args, **kwargs)

This is a simple Bazel wrapper around the http-server npm package.

See https://www.npmjs.com/package/http-server

A typical frontend project is served by a specific server. For typical example applications, our needs are simple so we can just use http-server. Real projects might need history-server (for router support) or even better a full-featured production server like express.

This rule uses a modified http-server to support serving Brotli-compressed files, which end with a .br extension. This is equivalent to gzip-compression support. See https://github.com/alexeagle/http-server/commits/master which points to a modified ecstatic library.

Attributes

templated_args

List of strings; Optional

arguments to pass to every invocation of the binary

**kwargs

Unknown; Optional

passed through to the underlying nodejs_binary