Code Monkey home page Code Monkey logo

mysimplehttpserver's Introduction

MySimpleHTTPServer

This Python script creates a simple HTTP server using the http.server module, allowing you to serve static files from your local machine.

Usage

  1. Place the files you want to serve in the same directory as the script.

  2. Run the script using Python 3:

    python server.py
  3. Open your web browser and navigate to http://localhost:8080/ to view the files.

Features

  • Automatic Index File: If no file is specified in the URL (e.g., http://localhost:8080/), it serves index.html by default.

  • Error Handling: If the requested file is not found, the server responds with a 404 status code and a "File not found" message.

  • Customizable Port: You can change the port number by modifying the server_address variable in the script.

mysimplehttpserver's People

Contributors

achunt01 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.