Coder Social home page Coder Social logo

adb-day-test's Introduction

Http Static File server Build Status

A simple HTTP file server for static files written in Java. Based on HTTP file server example from Netty project. http://static.netty.io/3.5/xref/org/jboss/netty/example/http/file/package-summary.html

Features

  • High performance, multi-threading - based on Netty network library (http://netty.io)
  • Large file support
  • Configurable via YAMML configuration file
  • supports directory listing via Mustache templates (http://mustache.github.com/)
  • supports HTTP Keep Alive

Requirements

Tested on Linux, should be multi-platform.

How to build

    git clone [email protected]:ieugen/adb-day-test.git
    cd adb-day-test
    mvn clean install

After it builds successfully unpack the archive and run:

    cd target/
    tar zxf file-server-0.1-application.tar.gz
    cd file-server-0.1
    ./http-fileserver.sh

You should get output similar to this:

    $ ./http-fileserver.sh
    [main] INFO ro.ieugen.fileserver.Main - Reading configuration from http-server-conf.yml
    [main] INFO ro.ieugen.fileserver.http.HttpStaticFileServer - Starting HTTP server on port 9112 with root src/

Configuration

You can configure the server via a configuration file written in YAMML (http://www.yaml.org/spec/1.2/spec.html).

Options are:

  • port - the port on which to serve files, default 9111
  • root - a path for the root directory from which we serve files, default is current working directory
  • workerThreadCount - the number of Netty worker threads to server files, default is 4
  • template - Mustache template for rendering the directory listing, default is 'index-template.html'

You can change the configuration file name the server reads via http.server.config system property (-Dhttp.server.config=""). Sample configuration options in the file may look like:

port: 9112
root: root/

adb-day-test's People

Contributors

ieugen avatar

Watchers

 avatar  avatar  avatar

adb-day-test's Issues

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.