Category: typescript

  • TypeScript is not type safe

    Let’s say we have an API that return true or false ( TILT – Things I learned Today – http://tiltwebapp.azurewebsites.net/  – returns true if I have learned something today ) What is wrong with this code: public HasTILTToday():Observable<boolean>{ if(!this.wasLoggedIn)return of(false); return this.http.get<string>(this.baseUrl+’TILT/HasTILTToday’,{ headers: new HttpHeaders(         { ‘Authorization’: ‘CustomBearer ‘ + this.jwt, ‘Content-Type’: ‘application/json’        …

  • Covid Data -CI/ CD–part 5

    Now I need that every data ( either from the github .md file,either gathered from https://github.com/CSSEGISandData/COVID-19/ ) be updated into the site. Github Actions to the rescue! I have created 2 different workflows : one for gathering the data from the https://systems.jhu.edu/research/public-health/ncov/,the other for compiling the .md files and the Angular app. Thinking more,I should…

  • Covid Data–transforming – part 3

    I figured out that from data ( .md files and .js files) I need to have a proper data to be processed by the application. Since the application will be a static web app,the easy way is to be a generated js file to be imported into the application. 1.   MD to js So now…

  • Bingo Meetings- conclusion–part 25

    It was a nice journey  to make an application just with TypeScript and Node ecosystem.  There are some missing parts ( e.g. testing the GUI – e2e in JS parlance) However,some thoughts: The ecosystem does not have good support for mono-repository (in C# parlance,solution with multiple referencing projects ) Yarn Workspaces helps TypeScript compile should…

  • Bingo Meetings- documenting code–part 24

    We have already documented the process of reproducing our code on developer PC ( including docker …)  So now we should help programmers understand the code that we have create and it’s general use. For this,for any project that we have : 1. We should  add a Readme.md file to explain the project 2. We…

  • BingoMeetings–4 steps to run in Docker both WebAPI and Site-part 22

    Now what I want to achieve is to run the WebAPI and Angular Site in docker. For this,we should compile the Angular site and copy into the WebAPI. Also,WebAPI should serve the index.html file generated by the Angular. Those are the 4 steps: 1. Ensure that  the Angular routes and WebAPI routes should be different…

  • Bingo for meetings-build an Angular app-part 20

    Now it is time to create some Angular GUI. ( If you want to learn Angular,please visit https://angular.io/ ) Problems encountered: 1. The CreateMeeting did not compile (ng serve ) the CreateMeeting class ( because of the nestjs Swagger  decorators ). So I ended creating an interface ICreateMeeting with the same definition and using in…

  • Bingo for meetings–finalizing API for web–part 16

    The API that we want to create is create meeting add participant check cards see result meeting( Those API’s  were simpler for the console application,because of the single participant involved. There are also some technical problems and some architectural ones. Let’s start with technical: nestjs suggest ( as per sample project with contacts) to add…

  • Bingo for meetings-nestjs–create meeting api -part 15

    So now it is time to expose our objects as HTTP API. We have decided to go with nest.js because has support for TypeScript. The documentation to install is pretty obvious at https://docs.nestjs.com/ . Now we must code the endpoint to create a meeting. As per the nest.js documentation,we should create a module,a controller and…

  • Bingo for meetings–typescript making exe console–part 14

    Now it is the moment to have our first executable release– console application. First,we want to see if the js obtain by compilation of ts run under node ( it runs under  ts-node index.ts,but it runs under node.js ? ). And we see that,when I run node index.js it gives error “ could not find…