Skip to content
generated from itsmikita/repo

Simple web server to serve static files built with Bun.

Notifications You must be signed in to change notification settings

hyper-hyper/hyper-server

Repository files navigation

The @hyper-hyper/hyper-server

Simple web server to serve static files from ONE assigned root-directory.

Usage

  1. Add it to your project:

    bun add github:hyper-hyper/hyper-server
  2. Run it from CLI:

    hyper-server --watch --hostname localhost --port 8080 ./public

Options

You can run hyper-server --help to see the help wizard.

Option Default Description
--hot false Enable hot-reloading. Injects client-side script automatically.
-r, --root . Document root folder to serve
-w, --watch . Watches files for changes and pings on the next available port via WebSocket
-h, --hostname 0.0.0.0 Server's hostname. When 0.0.0.0 serve both localhost and to local network.
-p, --port 3000 Port to listen to. Needs sudo to assign ports below 3000.

Features/Todo

  • Hot-reloading (inject client script)
  • Server configuration file
  • Watch mode (Websockets)
  • TypeScript support at runtime
  • JSX support at runtime
  • PHP support at runtime
  • SSL support
  • Self-Discovery with Bonjour
  • Run commands on remote
  • Event Emitter and Key binding

Resources