Navigation

    Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    Introduction to Nest.js — A Progressive node.js framework for backend.

    Back-End Development
    api backend javascript nodejs typescript
    4
    9
    380
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BuddhikaNelum
      BuddhikaNelum last edited by BuddhikaNelum

      Nest.png
      Nowadays we use JavaScript not only for front-end applications but also for server-side applications with the help of node.js. There are lots of popular frameworks out there for node.js. Express is the most popular framework so far. but there are other frameworks like Meteor, Koa, Sails, Hapi, Loopback, etc. Nest.js is also a server-side node.js framework built by Kamil Mysliwiec and the community, In the past 2 years nest.js become the fastest-growing node.js technology, and currently, it has 35.9K GitHub stars.

      As I mentioned before Node.js (for the server-side) has plenty of great libraries, But none of them solves the main problem of architecture. Nest provides an out-of-the-box application architecture that allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications. The architecture is heavily inspired by Angular.

      What so special about this framework?

      1. Nest JS is an open-source framework for building efficient, scalable Node.js server-side applications.

      2. Built-in typescript support. (yet still enables developers to code in pure JavaScript).

      3. Combines elements of Object-Oriented Programming, Functional Programming, and Reactive Programming.

      4. Nest.js provides a similar kind of architecture to other server-side applications like .NET Core, Java Spring Boot, etc.

      5. Under the hood, Nest makes use of robust HTTP Server frameworks like Express (the default) and optionally can be configured to use Fastify as well.

      Let’s create a “Hello World” app with Nest JS.

      1. First of all you need to install Node.js. Click here to download Node.js for your operating system.

      2. Then You need Nest-CLI. This helps you to initialize and develop your applications. Open the command line and execute this command.

      npm install -g @nestjs/cli
      
      1. Now you can generate a new project using this command. Replace “my-nest-project” with your project name.
      nest new my-nest-project
      
      1. Go to the project directory and execute the below command to start the application.
      npm run start:dev
      

      That's it, Now In your browser, open http://localhost:3000 to see a new application running. The app will automatically recompile and reload when you change any of the source files.

      You can easily learn lots of things by referring to Nest JS documentation. The Nest JS documentation is well-maintained and contains a lot of information with real examples. https://docs.nestjs.com/

      Read my original post on medium - https://dlbnprabath.medium.com/introduction-to-nest-js-a-progressive-node-js-framework-for-backend-acd76a018681

      Happy Coding :)

      1 Reply Last reply Reply Quote 3
      • root
        root Linux Help last edited by

        how about adonisjs ?

        https://preview.adonisjs.com/

        1 Reply Last reply Reply Quote 0
        • BuddhikaNelum
          BuddhikaNelum last edited by

          @root didn't try it yet. need to give it a try. :)

          root 1 Reply Last reply Reply Quote 1
          • root
            root Linux Help @BuddhikaNelum last edited by

            @buddhikanelum

            try make a small overview about adonis

            1 Reply Last reply Reply Quote 0
            • Nubelle
              Nubelle Web Development last edited by

              Thank you ,

              1 Reply Last reply Reply Quote 0
              • THPubs
                THPubs last edited by

                Good post @BuddhikaNelum ! But be careful about Nest. I have worked with it before. The framework is good. It gives you a good standard to start on. But NestJS blindly follows Angular. They were willing to keep outdated packages in their framework just because Angular forgot to update them on their framework even if there's no connection between the two. Kamil might be a good developer. But he is not that good when it comes to the community. It's mostly him working in the project. He does not approve PRs that much. If something happens to him, the project might go down. This is what I understood when I was working with it earlier. Hope things have improved now. But being that said, I would like to have a framework like this for the back end rather than having nothing.

                1 Reply Last reply Reply Quote 1
                • BuddhikaNelum
                  BuddhikaNelum last edited by

                  @thpubs Thank u for the valuable information. Currently, I am working on a NestJS project. I am coming from a .Net Core background yet I was easily able to catch up with Nest.JS because of its architecture. As you said it's great to have something like Nest rather than having nothing. That's why I thought of writing an article about Nest. But still, I like to work with .Net Core than any Node.JS framework out there. :)

                  root 1 Reply Last reply Reply Quote 0
                  • root
                    root Linux Help @BuddhikaNelum last edited by

                    @buddhikanelum

                    great explanation .

                    BuddhikaNelum 1 Reply Last reply Reply Quote 0
                    • BuddhikaNelum
                      BuddhikaNelum @root last edited by

                      @root Thanks :)

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      0
                      Online

                      1.9k
                      Users

                      952
                      Topics

                      4.8k
                      Posts

                      • Privacy
                      • Terms & Conditions
                      • Donate
                      • Contact Us

                      © Copyrights and All right reserved Lanka Developers Community

                      Sponsored by Axis Technologies (PVT) Ltd

                      Made with in Sri Lanka

                      | |