On this page:
server?
make-server-factory

25 Server🔗ℹ

 (require koyo/server) package: koyo-lib

This module provides a web server component.

procedure

(server? v)  boolean?

  v : any/c
Returns #t when v is a server.

procedure

((make-server-factory [#:unix-socket socket-path    
  #:host host    
  #:port port    
  #:limits limits])    
  dispatcher)  server?
  socket-path : (or/c #f path-string?) = #f
  host : non-empty-string? = "127.0.0.1"
  port : (integer-in 0 65535) = 8000
  limits : safety-limits? = (make-safety-limits)
  dispatcher : dispatcher/c
Creates a component that, when started, runs a web server bound to #:host and #:port using the given dispatcher. When the #:unix-socket argument is provided, the server is bound to a socket at that path instead and the #:host and #:port arguments are ignored. When the server component is stopped, the unix socket (if provided) is deleted.

The #:limits are passed directly to serve.