Fake Mirrors
    Preparing search index...

    Class NativeHttpServer

    Native-based http-server implementation.

    This server uses native Node.js http and WebSocket ws modules to handle HTTP requests and WebSocket connections.

    Depends:

    import { DIContainer } from '@famir/common'
    import { HTTP_SERVER, HttpServer, NativeHttpServer } from '@famir/http-server'

    // Get container singleton
    const container = DIContainer.getInstance()

    // Register in DI container
    NativeHttpServer.register(container)

    // Resolve from DI container
    const httpServer = container.resolve<HttpServer>(HTTP_SERVER)

    // Start HTTP and WebSocket server
    await httpServer.start()

    // Stop server
    await httpServer.stop()

    Implements