p-hatan/ mirror

pub repository

mirror.p-hatan.ir

shelf_static

0.2.2

Static file server support for Shelf

Download archive

Readme

shelf_static is a Handler for the Dart shelf package.

Build Status Coverage Status

Example

import 'package:shelf/shelf_io.dart' as io;
import 'package:shelf_static/shelf_static.dart';

void main() {
  var handler = createStaticHandler('example/files', 
      defaultDocument: 'index.html');

  io.serve(handler, 'localhost', 8080);
}
Changelog

0.2.2

  • Bumped up minimum SDK to 1.7.0.

  • Added support for shelf 0.6.0.

0.2.1

  • Removed Uri format checks now that the core libraries is more strict.

0.2.0

  • Removed deprecated getHandler.

  • Send correct mime type for default document.

0.1.4+6

  • Updated development dependencies.

0.1.4+5

  • Handle differences in resolution between DateTime and HTTP date format.

0.1.4+4

  • Using latest shelf. Cleaned up test code by using new features.

0.1.4

  • Added named (optional) defaultDocument argument to createStaticHandler.

0.1.3

  • createStaticHandler added serveFilesOutsidePath optional parameter.

0.1.2

  • The preferred top-level method is now createStaticHandler. getHandler is deprecated.
  • Set content-type header if the mime type of the requested file can be determined from the file extension.
  • Respond with 304-Not modified against IF-MODIFIED-SINCE request header.
  • Better error when provided a non-existant fileSystemPath.
  • Added example/example_server.dart.

0.1.1+1

  • Removed work around for issue.

0.1.1

  • Correctly handle requests when not hosted at the root of a site.
  • Send last-modified header.
  • Work around known issue with HTTP date formatting.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add shelf_static
pubspec.yaml
name: shelf_static
version: 0.2.2
author: Kevin Moore <github@j832.com>
description: Static file server support for Shelf
homepage: https://github.com/kevmoo/shelf_static.dart
environment:
  sdk: '>=1.7.0 <2.0.0'
dependencies:
  http_parser: '>=0.0.2+2 <0.1.0'
  mime: '>=0.9.0 <0.10.0'
  shelf: '>=0.5.7 <0.7.0'
dev_dependencies:
  args: '>=0.12.0 <0.13.0'
  path: '>=1.1.0 <2.0.0'
  scheduled_test: '>=0.11.0 <0.12.0'

Version history

VersionPublishedArchiveSHA-256
0.1.02014-04-25T16:50:08.046260ZDownloadce8d0e7bf7c0001e173d8efcff50e03514100efa1d59df56677d835a21e43337
0.1.0+12014-04-26T14:45:11.550790ZDownload4f5ad42bd4d9417a4f6aa1a6b213880dc9907654055d02aef0449adbbf744ef7
0.1.12014-05-09T17:15:32.844570ZDownload320d154a08e8580489107b77c1de89d2a9899867d971d9dc321650993f81feff
0.1.1+12014-05-09T20:30:01.870440ZDownload5489caa6dcbc55fe898b44c6fbb9fbd27a580c34cb8d684b3928b65e5a1d73e9
0.1.22014-05-10T21:39:41.388ZDownloadb02b123154f6b6de53d8942ade63645db48e0677d888c143feb3d382122e7791
0.1.32014-05-10T23:49:03.947270ZDownload94529c2be2d55b4d60e5672c0d7ac066fc3f18f48cd0c5c79843719b510bea01
0.1.42014-05-16T16:11:02.094870ZDownloadcae1818f14b8f7b8be68458a4554e9983aa08260259d721a6a93d4d951b2545b
0.1.4+12014-05-16T16:28:34.020380ZDownloadfeba98d576085b8965a88bb325a8da126423a592c014f22a6865ec580c60ff80
0.1.4+22014-05-16T16:30:16.151990ZDownload446b4bd7e4b825005ce0e0f757e784d0ddf4d31e2c246acc197383e478d49563
0.1.4+32014-05-16T16:39:43.002440ZDownload9ecb55cc991988ab9fddc3f85451200a1f2ac93210ac46485caca74fa9485d3a
0.1.4+42014-05-25T00:32:06.237640ZDownloadafb72a2c56b47193a66209195714ad516b7b39ed562d0fb8174c2de09dbe1cef
0.1.4+52014-05-25T01:03:38.934770ZDownloadd8184fd546224169eaf9d775a9ce9c4459af04dcba6970ec909de2942353b206
0.1.4+62014-05-29T19:42:43.735240ZDownload939330e4c9476e9c1233c80eb09ec6495b5c3918e42e4d8f012baa7015aa5a8d
0.2.02014-07-01T00:46:21.806230ZDownloadc1b76a8c6cc61708cdaea601d40d17a187b9e93297940588021994133def1035
0.2.12014-09-23T21:41:35.721450ZDownloadd68ac18dd7dd00182c38b96014047004592b27bc0c52913e3f4b516f1c806381
0.2.22015-03-06T23:12:51.816810ZDownload5fea55820a68dde41b19bf33f7aea1d0c6655b07983f3788206a1374c2749cc5
0.2.32015-07-31T19:49:03.134ZDownload0466de9b34333d3354b8736d0afb962a1e2e78ddc5490b0d7c6cae405aa6a8a5
0.2.3+12015-08-26T19:42:31.301ZDownloadf09fd6aec6932a91b24c7211f69828ca2f02eafcb19b40954dbf6d4323bcdcd5
0.2.3+22015-12-14T22:23:03.007ZDownloada23300181549d23a253001ea40295afeacca538df2abf7690cc1ca8861a77b74
0.2.3+32016-02-02T21:34:49.368ZDownload12f2156419fb11ea809ecacaf77f6c9e4ce1345cedda1d7236d975ff42af4daf
0.2.3+42016-05-05T17:23:22.708ZDownload3b92263142730f930f1263ac3fef09a4df350ee091d4b608f695dc9f47db4935
0.2.42016-07-06T23:03:11.885ZDownload0b302c648bbd4a1775ace3b43c9a604a7f199619375554447835c875918343d0
0.2.52017-07-07T16:08:37.465454ZDownload97bf321be91bd601841cf064cce7271eccce9ea4dc94b5c0cfb4dfd3100db663
0.2.62017-10-18T23:52:26.870228ZDownloadb8bc5cf23b253cc3fc0831eef871d8217c2e5f8c5ed2698d819e72e18c6660aa
0.2.72018-01-04T21:44:03.944280ZDownload538717076e0869cd3a45a3b4abee204b172e5b92daa5368b38671e0a79239417
0.2.7+12018-05-22T15:22:27.661299ZDownloadb603d232cd35d6124ab84f0767d7e75e25676d935fa650cd8bbd3bbc6b5e8d60
0.2.82018-07-12T17:44:43.121402ZDownload2020a57c81286e98b485c4b3ec55cbdd11aea03d96414c50e82d95e9ea690224
0.2.9+12020-12-17T01:03:06.695291ZDownload8ee72c77d3ba4fd40a30e603352fd079a740be60ac9ab5925bf893552cc18631
0.2.9+22021-01-29T03:34:17.516258ZDownloade5ddf2266fa3d342728476a4c9718735d1e8eff1c5da1f8a3df0042f3b83c83c
1.0.02021-02-24T17:44:13.811489ZDownload8584c0aa0f5756a61519b1a2fc2cd22ddbc518e9396bd33ebf06b9836bb23d13
1.1.02021-07-09T19:08:15.972911ZDownload4a0d12cd512aa4fc55fed5f6280f02ef183f47ba29b4b0dfd621b1c99b7e6361
1.1.12022-06-16T01:21:42.451408ZDownloade792b76b96a36d4a41b819da593aff4bdd413576b3ba6150df5d8d9996d2e74c
1.1.22023-05-03T19:27:33.588924ZDownloada41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
1.1.32024-09-06T16:01:03.025091ZDownloadc87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3
1.2.02026-10-16T22:19:58.679649ZDownload480504af9e5323899c5be26a4f6c2fc4437d50954d39842f0290f4ae733d57b4

Dependencies

http_parser "\u003e=0.0.2+2 \u003c0.1.0"

mime "\u003e=0.9.0 \u003c0.10.0"

shelf "\u003e=0.5.7 \u003c0.7.0"