nx.js

@nx.js/http

Interfaces

InterfaceDescription
ListenOptionsOptions object for the listen() function.
StaticFileHandlerOptionsOptions object for the createStaticFileHandler() function.

Type Aliases

Type aliasDescription
ServerHandlerHandler function for processing an HTTP request.

Functions

FunctionDescription
createServerHandlerCreates a socket handler function which accepts a socket event and parses the incoming data as an HTTP request.
createStaticFileHandlerCreates an HTTP handler function which serves file contents from the filesystem.
listenCreates an HTTP server and listens on the port number specified in the options object. The fetch function will be invoked upon receiving an HTTP request.

On this page