Skip to content

heroku-softtrends/dotnetcore.mysql.loyalty

Repository files navigation

.NET Core Buildpack with Heroku MySQL Support

(Heroku Button with ASP.NET Core + MySQL Sample)

This uses the .Net Core Buildpack provided by Softtends

We've made some big updates in this release, so it’s important that you spend a few minutes to learn what’s new.

You've created a new ASP.NET Core MySQL project. Learn what's new

You need to make the following changes in your Program.cs and project.json to deploy on Heroku
In Program.cs

  • Add UseUrls method and pass args[0] as parameter to start your app. Because Heroku web dyno will start with dynamic port after sucessful deployment. We need to use the same port in code behind also then only your app will start and listen on that port else dotnet runtime will set default port 5000. Thereby we pass port number as parameter with url in Procfile

public static void Main(string[] args {
var host = new WebHostBuilder() .UseKestrel() .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup() **.UseUrls(args[0])** .Build();
        host.Run();

}
In project.json

  • Add a new property called "outputName": "Your_ProjectName" in buildOptions
  • Remove scripts section. It has prepublish and postpublish actions which are not needed


You can deploy this ASP.Net MySQL website on Heroku server by clicking below button

Deploy

This application consists of:

  • Sample pages using ASP.NET Core MySQL
  • Gulp and Bower for managing client-side libraries
  • Theming using Bootstrap

How to

Overview

Run & Deploy

We would love to hear your feedback

About

.Net Core Sample app that can be deployed on Heroku using dotnetcore.mysql.buildpack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published