dotnetcore - gpawade/gpawade.github.io GitHub Wiki

Dotnet Core

export ASPNETCORE_URLS=http://*:4000 && dotnet TravelNxt.PointBank.Api.dll

Create the APP

# Create the web application scopfolding
$ dotnet new -t web

# restore the nuget package
$ dotnet restore

# Using visual studio - modify the application

# build the app
$ dotnet build

# run the app
$ dotnet run

Deploy the app in Ubuntu

Install Supervisor

Supervisor is a monitoring application that will run & monitor our .Net Core application The configuration for the applications to run is specified in *.conf files in /etc/supervisor/conf.d/

$ apt-get install supervisor

Creating Deployment Folder

$ cd /var
$:/var# mkdir appSite
$:/var# cd appSite
$:/var/appSite# 

# Copy the code in deployment folder

Configuration

$ cd /etc/supervisor/conf.d/

creating app conf

$ vi myapp.conf

	[program:Program]
	command = /usr/bin/dotnet /var/site/app.dll
	directory=/var/site/
	autostart=true
	autorestart=true
	stderr_logfile=/var/log/myapp.err.log
	stdout_logfile=/var/log/myapp.out.log
	environment=HOME=/var/www/,ASPNETCORE_ENVIRONMENT=production
	stopsignal=INT
	stopasgroup=true
	killasgroup=true
Restarting Supervisor
$ service supervisor stop
$ service supervisor start

Swagger Document

https://www.myget.org/feed/domaindrivendev/package/nuget/Swashbuckle.AspNetCore/1.0.0-preview-0101

Test

Compare xunit.net to other framework

https://xunit.github.io/docs/comparisons.html#note2

xunit

⚠️ **GitHub.com Fallback** ⚠️