The twelve-factor app is completely self-contained and does not rely on runtime injection of a webserver into the execution environment to create a web-facing service.
The web app exports HTTP as a service by binding to a port, and listening to requests coming in on that port.
HTTP is not the only service that can be exported by port binding.
Nearly any kind of server software can be run via a process binding to a port and awaiting incoming requests. Cheers!!