Git Product home page Git Product logo

joelreyesheroku / dotnetcore.postgres.property Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heroku-softtrends/dotnetcore.postgres.property

0.0 1.0 0.0 8.25 MB

.Net Core Sample app with Postgress database that can be deployed on Heroku using dotnetcore.postgress.buildpack

C# 1.68% HTML 23.12% JavaScript 61.27% CSS 12.42% PHP 1.13% Makefile 0.01% Shell 0.04% CoffeeScript 0.09% Go 0.13% Python 0.11%

dotnetcore.postgres.property's Introduction

.NET Core 1.0 Sample code with Heroku Postgres Support

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

This uses the .Net Core Buildpack provided by Softtends and adds full support for Heroku Postgres

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 MVC 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 MVC website on Heroku server by clicking below button

Deploy

This application consists of:

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

How to

Overview

Run & Deploy

We would love to hear your feedback

dotnetcore.postgres.property's People

Contributors

shanmugam-softtrends avatar heroku-softtrends avatar baliles avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.