ptwebserver 0.2.4

  • Installing
  • Versions
  • 26

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 = "DCS_Intranet";
  ptHost host = new ptHost(); = "test";
  host.address = "";
  host.port = 8080;
  host.public_path = "/var/www/";
  host.allow_dir_view = true;
  ptWebServer server = new ptWebServer(cfg);


Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  ptwebserver: "^0.2.4"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:ptwebserver/ptwebserver.dart';
Version Uploaded Documentation Archive
0.2.4 Feb 17, 2014 Go to the documentation of ptwebserver 0.2.4 Download ptwebserver 0.2.4 archive
0.2.3 Feb 14, 2014 Go to the documentation of ptwebserver 0.2.3 Download ptwebserver 0.2.3 archive
0.2.2 Feb 4, 2014 Go to the documentation of ptwebserver 0.2.2 Download ptwebserver 0.2.2 archive
0.2.1 Feb 4, 2014 Go to the documentation of ptwebserver 0.2.1 Download ptwebserver 0.2.1 archive
0.2.0 Feb 3, 2014 Go to the documentation of ptwebserver 0.2.0 Download ptwebserver 0.2.0 archive
0.1.1 Feb 1, 2014 Go to the documentation of ptwebserver 0.1.1 Download ptwebserver 0.1.1 archive
0.1.0 Feb 1, 2014 Go to the documentation of ptwebserver 0.1.0 Download ptwebserver 0.1.0 archive
0.0.15 Feb 1, 2014 Go to the documentation of ptwebserver 0.0.15 Download ptwebserver 0.0.15 archive
0.0.14 Feb 1, 2014 Go to the documentation of ptwebserver 0.0.14 Download ptwebserver 0.0.14 archive
0.0.13 Feb 1, 2014 Go to the documentation of ptwebserver 0.0.13 Download ptwebserver 0.0.13 archive

All 22 versions...


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
86 / 100
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Primary library: package:ptwebserver/ptwebserver.dart with components: io.


  • Maintain

    Changelog entries help clients to follow the progress in your code.

  • Homepage does not exists.

    We were unable to access at the time of the analysis.

  • Package is too old.

    The package was released more than two years ago.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 error 17 hints.

    Strong-mode analysis of lib/ptwebserver.dart failed with the following error:

    line: 42 col: 19
    The argument type '(String, List<ptHost>) → Null' can't be assigned to the parameter type '(dynamic, dynamic) → void'.

    Run dartfmt to format lib/config.dart.

    Similar analysis of the following files failed:

    • lib/ext/def.dart (hint)
    • lib/ext/php.dart (hint)
    • lib/extHandler.dart (hint)
  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use ptwebserver.dart.