Git Product home page Git Product logo

file_server's Introduction

file_server

file_server is a Dart 2 sample HTTP file server application. Do not use this code without security and stability enhancement for actual applications. This is a code sample and an attachment to the "Dart 2 Language Gide" written in Japanese.

Installing

  1. Download this repository, uncompress and rename the folder to "file_server".
  2. From Dart Editor, File > Open Existing Folder and select this file_server folder.
  3. Select Tools > Pub Install to install pub libraries.
  4. Put files you want to send into the resources/ folder.
  5. Run the bin/file_server.dart as server.

Try it

  1. Access the server from your browser: http://localhost:8080/fserver (Downloads the initial page)
  2. From the initial page, choose a file from the file list. Or, enter the file_name and click the submit button.
  3. Alternatively, you can specify the file from the address bar in your browser such as:
    http://localhost:8080/fserver/resouces/file_name

You can specify the file_name using relative path or absolute path. For example, let C:/dart_apps_server/file_server is the folder path of the file server and the resources/readme.text file is placed in the folder. Then, specifying resources/readme.text is equivalent to C:/dart_apps_server/file_server/resources/readme.text.

Likewise, resources/images/Dart_Logo.jpg is equivalent to C:/dart_apps_server/file_server/resources/images/Dart_Logo.jpg.

License

This sample is licensed under MIT License.

file_server's People

Contributors

mitsuoka avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.