JSPM

utilserve

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 9
    • Score
      100M100P100Q58110F
    • License MIT

    A zero-config static file server featuring a premium terminal interface, built-in directory explorer, and clean URL routing.

    Package Exports

    • utilserve

    Readme

    utserve

    utserve helps you serve a static site, single page application, or just a static file directory effortlessly. It features a robust routing engine, automatic caching, and provides a beautiful terminal interface for monitoring requests.

    To view and browse your directory's contents, navigate to /_utserve while the server is running.

    Usage

    utserve requires Node.js 18-25 to run

    The quickest way to get started is to just run npx utserve in your project's directory.

    If you prefer, you can also install the package globally:

    user@arch: ~$ npm install --global utserve
    

    Once that's done, you can run this command inside your project's directory...

    user@arch: ~$ utserve
    

    ...or specify which folder you want to serve by navigating to it first:

    user@arch: ~$ cd build/
    user@arch: ~$ utserve
    

    Now you understand how the package works! 🎉

    Configuration

    To customize utserve's behavior, create a utserve.json file in your project folder and insert your overrides. If this file is missing, the server falls back to these defaults:

    {
      "port": 3000,
      "cors": true,
      "gzip": true,
      "cacheControl": "public, max-age=3600",
      "showDirectoryListing": true
    }
    

    Developer Experience

    Unlike standard static servers, utserve is built with a premium developer experience in mind. It features a Rust-style error logger that automatically syntax-highlights the exact payload and context of any server failures, keeping your terminal clean and highly readable.

    Issues and Contributing

    If you want a feature to be added, or wish to report a bug, please open an issue in the repository.

    If you wish to contribute to the project, please ensure you run npm run lint and npm run test before submitting a Pull Request to maintain routing and security stability.

    Author

    oopsio