angelitocsg / coding-live-002

Deploying a .NET Core API to Heroku

Home Page:https://youtu.be/ForZyoZmZmQ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deploying a .NET Core API to Heroku | Coding Live #002

Getting Started

These instructions is a part of a live coding video.

Prerequisites

Example project

Create a base folder CodingLive002.

Create the .gitignore file based on file https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

Create an API project

dotnet new webapi --name MyApi

Add nuget package for SignalR

dotnet add package Microsoft.AspNetCore.SignalR --version 1.1.0

Create a React App with typescript

npx create-react-app counter_page --template typescript

Add npm package for SignalR

yarn add @microsoft/signalr

Deploying a container to Heroku

# Build React.js
yarn build

# Build container `webapi`
docker-compose build

# Heroku deploy process
heroku login
heroku apps:create myapp-name
heroku container:login
heroku container:push web -a myapp-name
heroku container:release web -a myapp-name

About

Deploying a .NET Core API to Heroku

https://youtu.be/ForZyoZmZmQ


Languages

Language:C# 45.6%Language:TypeScript 19.9%Language:HTML 19.5%Language:Dockerfile 7.8%Language:CSS 7.1%