ptWebServer

ptWebServer is a configuration web server that supports multiple hosts and addresses. It can be as simple as a simple web server with no extras to a very custom server response.

Warning: You must close the response when using a custom request callback

PHP execution

In your config, you may enable PHP and give it the path to PHP and using a little magic, send PHP responses. It should also pass along variables as well to both $_POST , $_GET and $_REQUEST appropriately. However, data beyond that point is currently not supported.

This feature has been tested mildly and in Linux.

Example usage:

import 'package:ptwebserver/ptwebserver.dart';

void main() {
  ptConfig cfg = new ptConfig();
  cfg.servername = "ptWebServer";
  
  ptHost host = new ptHost();
  host.address = "127.0.0.1";
  host.port = 8080;
  host.hostname = "test";
  
  cfg.hosts.add(host);
  
  ptWebServer server = new ptWebServer(config: cfg);
   
  server.Run();
}

Libraries

ptwebserver
ptwebserver