Nest
Moleculer
Nest | Moleculer | |
---|---|---|
315 | 16 | |
65,110 | 6,060 | |
1.1% | 0.7% | |
9.9 | 7.6 | |
7 days ago | 4 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Nest
- Why is no Laravel/Rails in JavaScript? Will there be one?
-
NestJS Developers: Upgrade Your Logging with This Simple Guide
NestJS is a powerful, progressive Node.js framework for building efficient and scalable server-side applications. It is written in TypeScript and is heavily inspired by Angular. It comes with a modular architecture and in-built support for a plethora of back-end features straight out of the box. One important part of developing applications with NestJS, or with any other back-end framework, is logging.
-
Create NestJS libraries to interact with Ory API
Ory offers excellent documentation but needs more support tools and in-depth examples of using its libraries in TypeScript and NestJS projects. I decided to contribute to it by creating a set of libraries to interact with APIs, which will (hopefully) make integration into your NestJS project easier. This post presents the ideal use case to divulge my routines for creating libraries in NestJS/Nx!
-
NestJS tip: how to change HTTP server timeouts
When using the NestJS framework, sometimes you may need to change some default timeout. You can define them just like you'd do in a plain Node.js HTTP server like so:
-
Containerize your multi-services app with docker compose
Back: a graphQL server built with Nestjs
-
Full Stack Web Development Concept map
NestJS - opinionated more scalable, but harder to learn docs
-
Don't go all-in Clean Architecture: An alternative for NestJS applications
Pragmatically, we can apply this to a Nest application by creating an Interface for our services, separating the Presenter layer (Controller) from the Use Case (Services):
- Utilizando Testcontainers para Testes de Integração com NestJS e Prisma ORM
-
A Gentle Introduction to Containerization and Docker
Itâs a text document that contains all the commands a user could call to assemble an image. Letâs check an example of a Dockerfile for a nodejs app in this case it will be a NestJS app and then explain each part.
-
Scalable REST APIs with NestJS: A Testing-Driven Approach
describe('Create bookmarks', () => { const dto: CreateBookmarkDto = { title: 'NestJS', link: 'https://nestjs.com/', }; it('should create bookmark', () => { return pactum .spec() .post('/bookmarks') .withHeaders({ Authorization: 'Bearer $S{userAt}', }) .withBody(dto) .expectStatus(201) .stores('bookmarkId', 'id')//store the bookmark id in the variable bookmarkId .expectBodyContains(dto.title) .expectBodyContains(dto.link) }); });
Moleculer
-
Make microservices look like monoliths
My goto for this kind of task is moleculer: https://moleculer.services/
Fast, battle tested, vue2-like approach, great documentation, good community. The automatic indipendent-scalability as an option is usually the main selling point of these solutions, but honestly I think the real pro is the "composition" approach, which is essential if you want to keep a clean and well-organized codebase. On this regard, I found moleculer pretty great even for large teams.
-
How to Import/Reference a Microservice from another one
If youâre using k8s, check out https://moleculer.services and this would likely solve what youâre looking for.
-
Node JS Microservice Frameworks for Developing Scalable Web Apps.
Molecular â Progressive Microservices Framework for Node.js
-
First time building microservice-based application
While youâre delving into microservices, check out Moleculer https://moleculer.services
-
if Nodejs does not meant for CPU intensive tasks so I think it's better to avoid it from the beginning
I almost canât believe I havenât seen it mentioned here before, but adding Moleculer into your node project (if itâs clustered/k8sâd) will literally solve many single threaded problems, not to mention tons of other scalability issues. https://moleculer.services/
-
How to deal with singletons in a distributed system?
You could use a framework for this. Have a look at moleculer
-
Where can I learn to implement microservices?
I haven't used this, but it seems neat: https://moleculer.services/
-
Microservices using express js
Look into Moleculer.
-
Been playing with moleculerjs recently, and just finished my first package: a service that allows you to use any node API framework as a moleculer gateway.
Moleculer already provides an in-house http gateway, but what if you want to use an existing API, and how to maintain decoupled code when creating your gateway? This package solves both. You can create your API, passing in any services you require as dependencies. You can then bind your API to moleculer using the moleculer-universal-gateway.
-
Donât start with microservices â monoliths are your friend
But there's more to the topic of microservices. Seems like all the conversation focuses on deployment pain. You can build a service with something like Akka or Moleculer where the modules act independently and have some message passing and resilience from each other, but they can still all live in one codebase, one process, and deployed as one unit. It works fine and isn't painful at all. And maybe down the line you decide to split the thing up into multiple processes and multiple deployment units, and that's an easy refactor because the modules are already somewhat separated.
What are some alternatives?
SailsJS - Realtime MVC Framework for Node.js
Express - Fast, unopinionated, minimalist web framework for node.
Koa - Expressive middleware for node.js using ES2017 async functions
AWS Lambda Router for NodeJS - AWS Lambda router for NodeJS
loopback-next - LoopBack makes it easy to build modern API applications that require complex integrations.
seneca - A microservices toolkit for Node.js.
feathers - The API and real-time application framework
AdonisJs Framework - AdonisJS is a TypeScript-first web framework for building web apps and API servers. It comes with support for testing, modern tooling, an ecosystem of official packages, and more.
Ts.ED - :triangular_ruler: Ts.ED is a Node.js and TypeScript framework on top of Express to write your application with TypeScript (or ES6). It provides a lot of decorators and guideline to make your code more readable and less error-prone. âď¸ Star to support our work!
fastify - Fast and low overhead web framework, for Node.js
Django - The Web framework for perfectionists with deadlines.
cote - A Node.js library for building zero-configuration microservices.