@awesomeorganization/servers

    1.1.0 • Public • Published

    servers

    💥 [ESM] The easiest way to create http, http2, https, https2, tcp, tls, udp servers in Node.js


    npm npm npm npm npm npm


    Example

    import { http, http2, https, https2, tcp, tls, udp } from '@awesomeorganization/servers'
    
    const http = await http({
      listenOptions: {
        host,
        ipv6Only,
        port,
      },
    })
    
    const https = await https({
      createOptions: {
        cert,
        key,
      },
      listenOptions: {
        host,
        ipv6Only,
        port,
      },
    })
    
    const http2 = await http2({
      listenOptions: {
        host,
        ipv6Only,
        port,
      },
    })
    
    const https2 = await https2({
      createOptions: {
        cert,
        key,
      },
      listenOptions: {
        host,
        ipv6Only,
        port,
      },
    })
    
    const tcp = await tcp({
      listenOptions: {
        host,
        ipv6Only,
        port,
      },
    })
    
    const tls = await tls({
      createOptions: {
        cert,
        key,
      },
      listenOptions: {
        host,
        ipv6Only,
        port,
      },
    })
    
    const udp = await udp({
      createOptions: {
        ipv6Only,
        type,
      },
      listenOptions: {
        host,
        port,
      },
    })
    

    Install

    npm i @awesomeorganization/servers

    DownloadsWeekly Downloads

    37

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    15.4 kB

    Total Files

    6

    Last publish

    Collaborators

    • sergey.sedoy.97