Category: github

BingoMeetings–build and deploy Angular WebSite to GitHub–part 21

Bingo is a small project, written in TypeScript , and developed with Alexandru Badita in launch break (one hour - more or less). You can find sources at . Those are my blog posts for Bingo : ( scroll below for the post)
1Create meeting
2Create Tests
3Finalize Create meeting
4Sharing meeting
5Keep Score
6Add obsolete
7Finalizing obsolete
8End meeting
9Dockerize tests
10Azure CI tests
11Yarn workspaces
13Intermezzo - CLI improvements
14typescript compile run with node
15NestJS ,swagger and create a meeting
16Finalizing API
17Intermezzo - jest vs jasmine error
18Refactor WebAPI and test service
19Heroku Deploy NestJs
21Deploy Angular to GitHub
22WebAPI and Web
24Documentation of the code

(Now the actual blog post for Bingo Meetings project)

What  we need is to deploy somewhere the WebSite application – the Angular. One version is to compile and deploy to the WebApi ( ), however  , I do prefer keeping separate.

One simple idea is to deploy to GitHub site . For each repository , GitHub lets you have a website correlated . For example , for our project, , github lets you have the site ( see username and repository changing position?) . What is there could come form different GitHub project settings – I choose to be in the docs folder.

So we need to compile the Angular Application and put the result on the docs folder on  Github

If we do this on a CI on Azure, it could provide an endless loop ( push code oin GitHub, compoiling on Azure, push on GitHub folder docs, compile again…)

So it should come from Developer PC. But how to do this in a repeatable manner ? Simple – Docker!

So we build inside Docker the Angular site, copy the compile from Docker on the local system, then we manually push the modifications on Github. The system has the advantage that it can be reproducible also on Azure.

So the bat looks like this

call build_web.bat
del /S /Q ..\docs\*.*
copy dist\bingo-cards-ui\*.* ..\docs\

See  for more details about the docker files.

One small modification also: the base href from angular should be this, to accept that is not rooted:

<!– <base href=”/”> –>


var isCordovaApp = !!window.cordova;

var hrefApp = “.”;

if (!isCordovaApp) {

var baseHref = window.location.href.split(‘/’);


hrefApp = baseHref.join(‘/’) + ‘/’;


document.write(‘<base href=”‘ + hrefApp + ‘” />’);


create docker to deploy to docs


GitHub as a central Hub

I do not know how, but GitHub is now a hub for all things.

I , personnally, used GitHub as a

– source control ( see )

– documentation ( see )

– Angular application deployment (   – done with  gh-pages –  see build.bat from )

– read-only database ( Sqlite download from github in the project )

I have seen many other uses

–  like Docker files generator ( for example, for docker phone gap  see )

– blog

and may others (

I need just a server hosting service affordable….

YouTube playlist exporter


The point here is about how simple is in our days to make a simple script as a programmer.

I wanted to export my playlists ( 5 minutes .NET , Export Word Exce l PDF  , EF 6 , Traceability ) videos into a simple HTML file that I could put into my website.

I searched first on internet – however, I found just you tube google api .

So I read the documentation (e.g.  , grab a developer key from and made a simple project.

Used also a NuGet package for JSON( Newtonsoft.Json) and one for export in Excel /Word /HTML / PDF /ODS (ExporterWordExcelPDF).

Total time : 2 hours. You can find the project here . It has only console application  – but it will have soon a GUI .

The point is that in our days it is easy to use third party application – and , for a programmer, easy as pie( eating, not making ; – ) )

Entity Framework 6 Record and play use : Unit Testing ( part 2 of 5)


Part 1 : What is EF record and play : 

Part 2: EF Record and play use: Testing :

Part 3: EF Record and play use: Make demo: 

Part 4: EF Record and play use: Record user Sql when a bug occurs:

Part 5: EF record and play: conclusions:


Let’s suppose that we have a program that have Departments and Employees.

And we want to make sure that, when we add an employee, the department must exists.

We can ensure this from database ( by foreign key) but we can pro-actively search for the department and throw a more meaningful validation .

More, I like more validation than errors.

So, let’s suppose that in the Validation for the Employee we must check in the database for the IdDepartment to see if there is such a department.

How could we make a test for that runs without a database ?

With some trick:  we first Record with a database  – then we can Play the file – and we do not need anymore the database. The test is self contained. 


Let’s see in action here


            #region set record EF
            var record = new InterceptionRecordOrPlay(@"", ModeInterception.Play);

            var e= new Employee();
            e.ValidateEmployee = true;
            e.IDDepartment = 60000;
            var err= e.Validate(null).ToArray();
            Assert.AreEqual(1, err.Length);

Source code is available at


There is also a NuGet package at

Entity Framework 6 Record and play – 1 of 5


Part 1 : What is EF record and play : 

Part 2: EF Record and play use: Testing :

Part 3: EF Record and play use: Make demo: 

Part 4: EF Record and play use: Record user Sql when a bug occurs:

Part 5: EF record and play: conclusions:


Entity Framework Record And Play

With this helper you can record and then play the actions in Entity Framework(>= 6).

For recording actions just reference the dll and use

DbInterception.Add(new InterceptionRecordOrPlay(@"", ModeInterception.Record)); 

(Note: For ASP.NET you will use Server.MapPath("~/a folder that supports write/")

For replay use

DbInterception.Add(new InterceptionRecordOrPlay(@"", ModeInterception.Play));

This can be use for

  1. Unit Testing
  2. Making demos
  3. Recording user actions when a bug occurred


Source code is available at

and has also a test 😉

There is also a NuGet package at 



Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.