Giter Club home page Giter Club logo

webserver's Introduction

HTTP Server with C#

This is a simple HTTP server implemented in C# using sockets. It can handle basic GET requests and serve static files from a specified root directory.

Features

  • Handles basic HTTP GET requests
  • Serves static files from the specified root directory
  • Supports configurable server port and root path

Requirements

  • .NET Framework (or .NET Core) installed
  • Visual Studio or any other C# development environment

Usage

  1. Clone the repository:

    git clone https://github.com/yourusername/http-server-csharp.git
    cd http-server-csharp
  2. Open the solution in your preferred C# development environment.

  3. Set the server port and root path in the app.config file:

    <appSettings>
        <add key="portNumber" value="9001" />
        <add key="rootPath" value="wwwroot" />
    </appSettings>
    • portNumber: The port on which the server will listen.
    • rootPath: The root directory from which the server will serve files.
  4. Build and run the project.

  5. Open your web browser and navigate to http://localhost:9001 (or the specified port).

Contributing

Contributions are welcome! Please feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

webserver's People

Contributors

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