Skip to content

Simple .NET 8 C# single-file console static web content server.

License

Notifications You must be signed in to change notification settings

thgossler/serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


serve

A simple C# static web content file server.
Report Bug · Request Feature · Contribute · Sponsor project · Sponsor via PayPal

Overview

This project implements a simple .NET 8 C# based single-file console application which serves static web content from a local filesystem folder on localhost. It supports HTTPS and handles the creation and use of the self-signed server certificate automatically.

Command line syntax:

serve [<rootFolder>] [--port:<number>] [--https] [--exitTimeoutSecs:<seconds>]
    --port             Port number to listen on (default: 8080)
    --https            Use HTTPS (default: false)
    --exitTimeoutSecs  Timeout in seconds to wait for requests before exiting (default: 300)

Example:

serve --port:3000 --https

This will check the availability of the self-signed server certificate, eventually create and install it, and then serve the contents of the current directory under https://localhost:3000/.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star 😉 Thanks!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Donate

If you are using the tool but are unable to contribute technically, please consider promoting it and donating an amount that reflects its value to you. You can do so either via PayPal

Donate via PayPal

or via GitHub Sponsors.

License

Distributed under the MIT License. See LICENSE for more information.

About

Simple .NET 8 C# single-file console static web content server.

Topics

Resources

License

Stars

Watchers

Forks

Languages