@nx.js/http
Interfaces
| Interface | Description |
|---|---|
| ListenOptions | Options object for the listen() function. |
| StaticFileHandlerOptions | Options object for the createStaticFileHandler() function. |
Type Aliases
| Type alias | Description |
|---|---|
| ServerHandler | Handler function for processing an HTTP request. |
Functions
| Function | Description |
|---|---|
| createServerHandler | Creates a socket handler function which accepts a socket event and parses the incoming data as an HTTP request. |
| createStaticFileHandler | Creates an HTTP handler function which serves file contents from the filesystem. |
| listen | Creates 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. |