[][src]Module roost::server

The server module that uses actix-web to handle HTTP requests.

Constants

HTML_PLACEHOLDER

A string within the body tag of index.html that will be replaced with the initial HTML contents of the SPA.

STATE_PLACEHOLDER

A string within a script tag of index.html that will be replaced with JSON data of the initial state of our SPA.

Functions

index

The server-side rendered SPA HTTP response.

init_app

Creates an application instance that is used by all HttpResponses. The created application has its states set based on the provided path information.

response

A JSON HTTP response based on the provided route path. The JSON consists of serialized entry contents.

serve

Handles HTTP requests and responses based on the provided route path.