Git Product home page Git Product logo

http-server-1's Introduction

HTTP-Server

Basic HTTP Server with a feature to invoke an OS shell in the dir the files are being served from.

I was in need of a quick HTTP-Server for a project I am working on at the time of this post. Of course with Python you could use the one-liner python -m SimpleHTTPServer. However I figured my server could use some more features, for convenience sake I have added the option to invoke an OS shell in the directory your files are being served from. This is done so that you can easily move or copy the files you'd like to serve into the relevant directory. I have also added the option to define a host and port of your choosing but a default setting of 127.0.0.1:8000 is included as well.

Usage

Clone the repo with;

git clone https://github.com/NullArray/HTTP-Server.git

After which you can place the server.py file into the directory you wish to serve files from. Start it from the command line and simply answer the prompts. When the server is configured it will start serving the files in said directory.

Personally i just put the execution of the script on an alias like so.

alias serve='cd /home/$USER/server && python server.py'

Easier than a one-liner and with extra features to boot in my humble opinion.

Dependencies

For this to work you will need the SimpleHTTPServer and blessings modules.

http-server-1's People

Contributors

nullarray avatar

Watchers

 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.