Author: bhanu

  • Different Ways to Create Sever in NodeJS

    In this post, I’m gonna share all the ways I know to create a server in nodejs.

    So I found 4 ways or i can say four inbuilt nodejs modules to create a server in nodeJS:

    • Http module: this module can be used to create an http server which will use https protocol that means It is not secured. It is used to create http server or website.
    • Https module: this module is secure version of https module, to create sever using this module you’ll need SSL certificate and its private key. It is used to create https server or https websites.
    • Net module: this module is used to create server too but it handles raw tcp communication. It can be used to create tunnel, vpn or your custom protocol like https.
    • Tls module: this module is used to create secured server to handle row tcp communication. It can he also used to create vpn, tunnels or custom secured protocol like https.
  • What I Know About Kotlin Language

    Kotlin language is mostly used with Android studio to create native Android apps. I don’t know other use of this language BTW, of course it could be useful in some other fields too.

    Var vs Val

    There are two ways to define a variable in this language which are var and val

    1. Var -> when we define a variable using var keyword in this language, that variable’s value can be modified. It is similar to let in the JavaScript language
    2. Val -> when we define a variable using val keyword its value cannot be modified later. It is similar to const in the JavaScript language.

  • About Jetpack Compose in Android Studio

    Jetpack compose is used to build modern UI using Material 3 library and you don’t need to create UIs in the XML as we do in the normal android studio project.

    Best dependencies or packages I found while learning about Jetpack Compose:

    1. Coil -> It is used to show the image directly from the URL in the app. You just need to add the dependencies in the build.gradle file at app level and done. Now you are ready to use the AsyncImage function (I don’t know exactly what to say those who render something on the screen.
      Note: as you are going to use URL in the AsyncImage that means you need have the internet permission in the android manifest.
    2. Retrofit -> It is used to do API calls either it is GET, POST, PUT, PATCH or DELETE or any other HTTP methods. To use this package you need implement its latest version in the app level build.gradle file.
      Not: as it is also going to use internet, you should have internet permission in the android manifest xml file.
    3. Converter-Gson -> It is used with Retrofit to parse JSON from the response we receive from the API.
    4. Media -> This package is used to play the video from the URL in the jetpack compose.
  • Hello world!

    Welcome to my blog. This is my first post. My name is Bhanu Stark and I’m sharing my learnings and progress here.