Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thiagobarradas/dotnet-core-webapi-with-docker-demo

ASP.NET Core Web API Demo with Docker, Nancy and Kestrel.
https://github.com/thiagobarradas/dotnet-core-webapi-with-docker-demo

api appveyor demo docker dotnet dotnetcore kestrel nancy webapi

Last synced: 3 days ago
JSON representation

ASP.NET Core Web API Demo with Docker, Nancy and Kestrel.

Awesome Lists containing this project

README

        

# DotNetCore.WebApi.Docker.Demo

[ASP.NET Core](https://www.microsoft.com/net/core "ASP.NET Core") Web API Demo with [Docker](https://docs.docker.com/ "Docker"), [Nancy](http://nancyfx.org/ "Nancy") and [Kestrel](https://github.com/aspnet/KestrelHttpServer "Kestrel").

# How to run project?

First head into the `DotNetCore.WebApi.Docker.Demo` folder and then build a release version with the following commands.
```sh
cd DotNetCore.WebApi.Docker.Demo
dotnet build --configuration Release
```

After that, head back in the root of the project, then start running with docker (your terminal must be in same directory that the DockerFile):

```
cd ..
docker build -t dotnetapidemo . --no-cache
docker run -t -p 1234:5000 dotnetapidemo
```

First line builds app and sets image name to *dotnetapidemo* (you can change). The next line run app in a container exposing your port 5000 in port 1234 (you can change too).

To check if app is running, access `http://localhost:1234/test`. You should see something like:

```
{"message":"This is a simple test"}
```

# Build Status

[![Build status](https://ci.appveyor.com/api/projects/status/4wrul3qj9iyv0pwh?svg=true)](https://ci.appveyor.com/project/ThiagoBarradas/dotnetcore-webapi-docker-demo)

# Author

[Thiago Barradas](https://www.linkedin.com/in/thiagobarradas "Linkedin")