ptwebserver 0.2.4

  • README.md
  • Installing
  • Versions
  • 29

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();
  host.name = "test";
  host.address = "127.0.0.1";
  host.port = 8080;
  host.hostnames.add("test");
    
  host.public_path = "/var/www/";
  host.SetDefaultHandlers();
  host.public_index_files.add("index.html");
  host.public_index_files.add("index.php");
  host.public_index_files.add("index.htm");
  
  host.allow_dir_view = true;
  
  cfg.hosts.add(host);
  
  
  ptWebServer server = new ptWebServer(cfg);

  server.Run();
}

1. Depend on it

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


dependencies:
  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 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...

Analysis

This feature is new.
We welcome feedback.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Dec 6, 2017
  • Dart: 2.0.0-dev.8.0
  • pana: 0.7.3+1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
95
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall score:
Weighted score of the above. [more]
29

Platforms

Detected platforms: Flutter, server

all of the above

Suggestions

  • Maintain CHANGELOG.md.

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