Skip to content

angelitocsg/coding-live-002

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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