Posts

Technohub

Typescript configuration file

Even if your program contains error typescript converted ts file to java script. we don't want this behavior if there is any error in typescript don't want its JavaScript file  for that we need typescript configuration file tsc --init open config file and uncomment "noEmit": true,    or you can use below command tsc --noEmitOnError   test.ts

TypeScript-2 : First Example

 extension of type script  file is .ts example abc.ts xyz.ts pqr.ts test.ts let x = 10 log.console(x) command to run file :  tsc test.ts after execution created new file - test.js run :-                               node test.js file is not compile its trans file : one human level language to other human level language

TypeScript- 1: Installation

                                                       how to install typescript: to install typescript first install node in your computer and then below command. npm install -g typescript -g stand for global. Here have install typescript globally , it means I can access anywhere in my computer. Check typescript properly installed or not tsc --v                                                                    Steps to install node JS : type "node js " in google  click on first link you will redirected to https://nodejs.org/en download node js and install in your computer  check node properly installed or not by using "node -v"  command

AWS- Simple Notification Service: AWS SNS Service

                         Comming soon

Angular 14

You should know 3rd party dependency for angular.  Bootstrap Toaster Awesome-Fonts (Images ) Sweetalert2 1.    npmjs.com  You can go to website and search anything for library you get the result with npm command.  Example : bootstrap                 font-awesome for toaster or animation                     npm install ngx-toastr                npm install @angular/animations need to import BrowseAnimationModules from@platfomr/broser/animation in module.ts import { NgModule } from '@angular/core' ; import { BrowserModule } from '@angular/platform-browser' ; import { AppRoutingModule } from './app-routing.module' ; import { AppComponent } from './app.component' ; import { BrowserAnimationsModule } from '@angular/platform-browser/animations' import { ToastrModule } from 'ngx-toastr' ; @ NgModule ({   declarations : [     AppComponent   ],   imports : [     BrowserModule ,     AppRoutingModule ,     BrowserAnimationsModule

Running two docker container on same Network# Spring boot microservices # Docker # Docker Images #Docker Container

#consumer class TestController{ @Getmapping("data") public String getData(){ RestTemplate  t=new RestTemplate(); t.getforObject( "http://consumer:8080/getdata",String.class); } } FROM openjdk:8 EXPOSE 8080 ADD target/producer.jar producer.jar ENTRYPOINT ["java","-jar", "producer.jar"] #producer class TestController { @Getmapping("getdata") public String getData(){ return "This reponse comming from producer" } } FROM openjdk:8 EXPOSE 7000 ADD target/consumer.jar consumer.jar ENTRYPOINT ["java","-jar", "consumer.jar"] first craete network :   docker   create --network driver=bridge mynetwork (need correction from book) docker build -f  Dockerfile -t consumer (any name its just a tag name) . docker run -p 81:8080 --name=producer --network=mynetwork producer docker build -f  Dockerfile -t producer (any name its just a tag name) . docker run -p 82:7000 --name=consumer --network=mynetwork cons

What is staters ? How they Work ?

Spring boot provides the number of starters that allows us to add jars in classpath. Spring boot build in startes allowes us  develpoemrnt easier and rapid. Spring boot startes are the dependacy discriptor. In spring boot all the startes  follow same naming pattern spring-boot-starter-* Spring boot startes is combine a group of  common or related dependancies into single dependancy. Example :  Supoose if we want to create spring web application  with tomcat web server then we need to add following minimumn depednacies spring core jar, spring web,spring mvc, spring transaction jar  OK So Spring starter componenets combine  all the related jars into the single jar  file depenandcy to our build file  so insted of adding 4 jars we need to add only one jar in our project example spring -boot-startr-web By adding this spring boot automaticlly download all the related dependacies in our classpath