couch-kit
    Preparing search index...

    Function useStaticServer

    • React hook that manages a static HTTP file server for serving the web controller.

      In production mode, starts a StaticServer bound to 0.0.0.0 on the configured port, serving files from staticDir (or the iOS bundle directory + /www by default). On Android, staticDir must be provided since bundle assets live inside the APK. In dev mode, skips the server and returns devServerUrl directly.

      Parameters

      • config: CouchKitHostConfig

        Server configuration including port, dev mode, and static directory.

      Returns { error: Error | null; loading: boolean; url: string | null }

      An object with url (the server URL or null), error, and loading.