/PlainHttp

Just for workshop

Primary LanguageC#

Easy C# HTTP Server

This Project contains an easy C# http Server Reference to Benjamin N. Summerton. This service only counts visits and provide a "shutdown" button. Code is only in Program.cs.

HowTo local

  1. Open Terminal
  2. use cd to change to the folder containing this project

cd Path/To/Folder

  1. use Dotnet CLI to run Project

dotnet run

  1. You should get message :

Listening for connections on http://localhost:8000/

  1. Open Browser and navigate to http://localhost:8000/

HowTo docker

  1. Open Terminal
  2. use cd to change to the folder containing this project

cd Path/To/Folder

  1. use docker build to build the image in place

docker build -plainhttp -f Dockerfile/Dockerfile .

  1. Use docker run to run the image. Forward containerPort 8000 to hostport 8000.

`docker run -p 8000:8000 plainhttp

  1. You should get message :

Listening for connections on http://localhost:8000/

  1. Open Browser and navigate to http://localhost:8000/

Website

Website Preview