The Ioto web server is built by default when compiling from source.
After building, the Ioto web server is enabled via the config/ioto.json5 file. It is disabled by default.
If you wish to only run the web server, you can disable all the other services. In this manner, Ioto becomes a dedicated embedded web server.
The web server configuration is controlled via the web.json5 file.
Here is a minimal sample web.json5 that will listen on port 80 for HTTP requests and port 443 for TLS requests.
The configuration file defines the following items:
- Public name of the server
- The documents directory for files to serve
- The ports on which to listen for requests
- Request timeouts
- Request limits
- The tls (TLS) certificates
- Instructions to redirect requests
- Processing routes
- Policy for file upload
The configuration properties are defined in the Configuration Properties.
Here is a more detailed example: