ericbutera / echo-cs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP Echo Server

Simple http server that repeats what it saw.

Docker

# build & run the container
docker build -t echo-cs .
docker run -d -p 5000:80 --name echo echo-cs

# try it out with curl
curl -X POST -H 'Content-Type: application/json' -d "{\"key\":\"value\",\"key2\",\"value2\"}" http://localhost:5000/

Run from command-line

This supports self-signed https, which is nicer than the docker version.

# deps: wsl2 & dotnet core sdk
dotnet restore
dotnet build
dotnet run

Run from vscode

Push f5, hope the .vscode/lauch.json still works.

Based on Using Docker Multi Stage Builds to build an ASP.NET Core Echo Server

About


Languages

Language:C# 75.1%Language:Dockerfile 24.9%