Templates of simple web applications which uses Bandwidth API on .Net
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aspnet
nancyfx
.editorconfig
.gitattributes
.gitignore
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE
PULLREQUEST.md
PULL_REQUEST_TEMPLATE.md
README.md

README.md

Csharp Templates

Templates of Web applications (ASP.Net Core and NancyFx) which use Bandwidth APIs.

Install

git clone https://github.com/BandwidthExamples/csharp-templates.git
cd csharp-templates

dotnet new --install ./aspnet
dotnet new --install ./nancyfx

Usage

dotnet new bandwidth.asp.net # to generate ASP.Net MVC project

dotnet new bandwidth.nancyfx # to generate NancyFx project (based on ASP.Net Core backend)

Docker usage

To build and run the web app inside docker container without .Net Core installed run

docker build -t my-web-app-dev -f Dockerfile.Development . # to prepare image

docker run -i -t --rm -p 8080:5000 -e BANDWIDTH_USER_ID=<YOUR-USER-ID> -e BANDWIDTH_API_TOKEN=<YOUR-API-TOKEN> -e BANDWIDTH_API_SECRET=<YOUR-API-SECRET> my-web-app-dev # to run the app (it will listen port 8080)

To prepare ready to publish image of this app run

dotnet publish -c Release # to build Release and prepare other files

docker build -t my-web-app . # to build Docker image

After that you can publish your docker image on your hosting.