Starting a GenHTTP server instance will always require you to specify the handler that is responsible to generate responses to client requests. Depending on the kind of content you would like to serve (such as a website or a webservice), there are various handlers already available to be used.
Host.Create() .Handler(...) .Run();
Handlers are usually made available by an additional nuget module. You can find the modules which are currently available on nuget. To setup a project, you will usually reference the GenHTTP.Core package which includes the engine as well as basic elements for layouting and IO. Additionally, you can choose from several project templates which allow to create new projects for specific use cases within a couple of minutes.
If you would like to have full control over response generation, you can implement a custom handler.
Allows you to serve a themed web application with basic features such as templating, theming, sitemaps, or robots instruction files.
Lightweight layer to write web applications that follow the MVC pattern.
Provides REST based web services that can be consumed by clients to retrieve a JSON or XML serialized result.
Allows to easily serve static web applications such as a Hugo site.
Single Page Applications (SPA)
Allows to serve applications written with modern JS frameworks such as Vue.js, Angular or React.
Restricts the content provided by a section to authenticated users.
Client Caching (Policy)
Instructs the client to cache generated responses for some time.
Client Caching (Validation)
Instructs the client to download files only if they have changed.
Compresses responses generated by the server to save bandwidth.
Policies to be respected by browsers accessing resources on the server.
Caches responses generated by the server to serve them faster the next time they are requested.
Add behavior to all handlers within a section of your web application.
Automatically configures your web server for performance and security.
Define the layout of your web application by dividing it into sections.
Serves resources stored in a directory or as embedded resources within an assembly to the client.
Provides a file to the client as a download. This could be a file from the file system or from somewhere else.
Redirects the client to another location on the server or an external site.
Provides a simple, recursive web view on a directory on the file system.
Relays the request of the client to another server and returns the response fetched from there.
Allows you to handle requests differently depending on the host specified by the client. This allows to serve multiple domains using a single server instance.
Randomly distributes incoming requests to specified nodes to distribute the resulting load to other systems.