npm.io
0.1.1 • Published 5 years agoCLI

@resourcebundles/static-server

Licence
MIT
Version
0.1.1
Deps
4
Size
8 kB
Vulns
4
Weekly
0
Stars
19

@resourcebundles/static-server

Server that serves from a Resource Bundle.

Try out with example/example.rbn in this repository!

Installation

npm install -g @resourcebundles/static-server

Usage

CLI
rbn-static-server bundle.rbn
options
  • --port: the port to listen to. Default: 8080
  • --host: the address to bind. Default: 127.0.0.1
Fastify Plugin
import fastify from "fastify";
import { resourceBundleStaticPlugin } from "@resourcebundles/static-server";

const app = fastify();

app.register(resourceBundleStaticPlugin, {
  file: "./bundle.rbn",
});

Keywords