Building a modular monolith with Fastify

Spanish audio is available in the player settings
Rate this content

In my journey through Nodeland, I saw most teams struggling with the free-form nature of Node.js development: there are no guardrails for maximum flexibility. Yet, not all paths offer a smooth ride.
How to build applications that are well-organized, testable, and extendable? How could we build a codebase that would stand the test of time?
In this talk, we will explore how to avoid the trap of Singletons to create robust Node.js applications through the use of Fastify plugins: we will build a modular monolith!

30 min
14 Apr, 2023


Sign in or register to post your comment.

Video Summary and Transcription

Fastify is a powerful tool for building web applications and APIs in Node.js, with millions of downloads per month. It promotes encapsulation and structuring through plugins and decorators, allowing for code and data segmentation. The talk emphasizes the importance of modularizing applications by domains and features, and showcases a demo of a typical Fastify application. The speaker also discusses the benefits of using Platformattic for refactoring and launching Fastify applications in the cloud. The Q&A section covers topics such as dependency injection and debugging, while also highlighting the importance of separating business logic from API contracts.

Available in Español

1. Introduction to Fastify

Short description:

Happy to be here at Node Congress. Talking about Fastify, a powerful tool for building web applications and APIs in Node.js. It has a built-in logger called Pino. Fastify is widely used with millions of downloads per month. The problem with using a model view controller system is that it doesn't scale well in complexity. Instead of building a view layer, we focus on building APIs. This can lead to a large number of models and a lengthy routes.js file.

So, happy to be to be here at Node Congress. I have been... Look, I've known about this conference for a while, and it's so great to finally be here in Berlin. It's been a long time since I came to Berlin, and I kind of missed it. So, look, I am here talking about Fastify. So, it's great to be here, and so on.

So, a couple of things about me. I have a newsletter too, and in the UK, if you don't matter, just subscribe there, or follow me on Twitter, at Matteo Collina. And I also am also streaming on Twitch, so if you like that, you can join. Also, I need to correct Liz, because since I put in the bio, it's actually 17 billion in 2022. Whatever. Like, it's so much fun.

So, okay. So, today, we are talking about Fastify. And if you don't know Fastify, you probably should, but you should probably use it if you're using Node.js, right? This is not Congress, so I don't know. You should probably use Fastify to build your web applications and backends and APIs. How do you use it? Very easy, you require import whatever. It has a logger built in. EpiDays, you want a logger in your application, right? It's called Pino. And you can use it to create your routes using AsyncAwait and all the other shenanigans that you might want. It's probably 4 billion million times per year or something, downloads per month.

So, okay. Let's talk a little bit about why you should not use Fastify or anything, or how to not use Node.js. How many of you have built a model view controller system in your career? Great. What's the problem with this system is that ultimately it doesn't scale. In what sense it doesn't scale? Well, it doesn't scale well in complexity. If you are building an application, and you're building it using following model view controllers, okay, let's start with the view. Most of the time there's no view layer anymore, we just do build API, so that's gone. So if you are writing a piece of code, it either goes into the controller or the models, and if it, you know, a 50% chance. After a bit of time you have 2000 models and a routes.js file that is 10,000 lines long.

2. Building Monoliths with Fastify

Short description:

Truth. MVC leads to Carbonara and spaghetti code. Instead, structure your application by domains and features. Avoid mixing features' databases. Fastify offers encapsulation through plugins, enabling code and data segmentation. It has no cost or overhead and supports decorators. Encapsulation allows for nested contexts without sharing data between layers.

Truth. This is actual number from real code. So it doesn't really work well in that way, and it doesn't scale well in complexity. What do you do instead? Because the question is, if model view controller is not good enough, what do you do instead? And how a lot of few major companies and a few major system can actually build monoliths, because model view controller is not good but they still ship monoliths. So there's a few article every now and then about monoliths around, and why and how, what they are doing.

Well, to be honest MVC leads to Carbonara and spaghetti code, but I like the Carbonara and not the spaghetti code. That's it. So how do you do it? You need to structure your application by domains, by feature. You need to identify what are the key features of your application and segment it. And in between those systems, you tend to communicate over well-known APIs. The important part is, do not have one set of features, read the database of the other set of features. Because the moment you start dipping into both, then you have a lot of, you don't know how you end up with your relations. Or another term to say is if in order to fetch a data, you need to do a 10, you need to join 10 tables, you probably have the wrong schema. Okay? So think about that and what you're doing and reflect on your life choices.

So what makes a domain and how do we build monolith? Like it is something that we want to do, right? It's a good thing. And well, you know, it typically, it's a specific subject that is being developed, okay? Typical cases is the catalog or the order management system or a cart or whatever you want to call it, okay? In some of the stuff that they're recently been developing, it's called, we have a domain which is the organization and the teams and other stuff is about the applications and the code that you run on our cloud. So anyway, it's domains, and you want to avoid the spaghetti code. So what does Fastify as for helping out building with this stuff? Fastify offers a concept called encapsulation. So it enables you to structure your application in a set of plugins that you can use to segment your data, to segment your code and in that way they don't share anything, essentially. Now a few few may ask but you could do this before, right? There's other techniques. Yes, but this has no cost has no overhead whatsoever. Okay, it's super fast, so you don't have anything to pay for it. And it's great. It has also concept of this called the decorator. So you can actually add stuff to your to your code and application. So how does encapsulation work? You basically can create context within context within context within this context, like kind of from a big matrioshka, and each layer does not share anything with the previous one. It's great. It's something disappeared. Okay, fun. Some missing.

3. Encapsulation and Structuring with Fastify

Short description:

We can use the register call to create encapsulation contexts, decorate request or response objects with data and information, and utilize hooks. Fastify plugin allows breaking encapsulation and structuring the application as sub-apps with their own domains and sub-domains. Each sub-app can have its own plugins, routes, and code structure. Plugins can also be used for metaprogramming and customizing system behavior. In JavaScript applications, plugins and routes are used for structuring.

I don't know. Okay, fun. There was an example there. I don't know. Okay, it arrived. I have no clue. I've not done nothing. Great. What happened is that... What you can see here, we can use this register call to create these encapsulation context, and we can decorate our request or response objects with data and information, and we have a concept of hooks.

Here we have hooks, and we have the onRequest hook where we set the data, and these will lead... Given the two routes, you will have different value. You see that one and two. And those will have the same different values that have been populated based on the concept... Based on the metadata, on which the route is being executed. It's great, because in this way, we could actually create our stuff better. So how do you... But you know, every encapsulation system, there's a way to break encapsulation. So how do you break encapsulation? Well, there is an utility called Fastify plugin that lets you do that.

The key concept about it is you want to provide, to create, to structure your application as little bits of sub-apps. So that each one of them contains their own domain and their own sub-domain. And in that way, you can scale your JavaScript development to different parts. And each one of them has their own plugins, their own routes, and all the structure of their code. How do you break the encapsulation term? You use these nice, you can use a skip override or the Fastify plugin again. We are missing some slides, so I am, okay, it arrived. Also, you can use plugins to do metaprogramming. When you register a plugin or a route, you could automatically start creating new behavior. Automatically customize the way the system works. Let's skip, I'm a little bit late. How do you structure your normal JavaScript application? You use plugins and routes to structure your thing.

4. Building a Modular Monolith

Short description:

To build a modular monolith, you need to identify the domain, structure your coding folders, and use plugins and decorators to share code between domains.

These are typical structures for a monolith, right? This is not modular at all, it's just a monolith. Okay, fine. This is not the slide that I was supposed to. Okay, now it's green. Okay, so how do we build a modular monolith? First of all, it's one, and it arrived. You need to identify the domain that you want to do, and then two... Okay, you need to structure your coding folders so that you can lay out your domains one at a time. And three, it's the same. That's going to be fun when I do the live coding. You jinx me, Paolo. This is totally you. So three, you can use plugins and decorators to share code between domains.

5. Fastify Demo

Short description:

We are going to do a quick demo of a typical Fastify application. We have a folder with server.js that starts the app and configures it. In the app, we load Fastify and use Fastify autoload to automatically load plugins and routes. We have plugins for error management and handling not found. We also have an inventory object to store data and two routes for products and inventory. Let's run the demo and see the results.

And we are going to do a quick demo now because in fact, it's demo time. And this was supposed to be a nice picture of Rome, and the demo gods should be with me. But, apparently, okay, this is starting super well. So let's see how it goes.

Okay, so here we go. So we have this nice folder. And in this nice folder we have a few things. So these are typical Fastify application. I have my server.js that starts the things, and we configure my, we have a build method to build the app. And then I can close my, listen to something to port and host. And then close the app, cool. And in my app, what I do? Well, in my app I load Fastify. I use an utility called Fastify autoload to automatically load all my plugins, or my routes. And then I return the app.

What are my plugins? Well, I have a few different plugins. I have one for managing the error, and one for doing the handling a not found. And look, you want a not found and an error management, right? So, okay, and we have something called the inventory. What is an inventory? Well, the inventory is kind of this object that I use to store data, okay? At some point, you need an entity, somebody that you want to get some data from the database, okay? And you can use whatever you want. You can use Prisma. You can use Next. You can use just the database driver. But at some point, you will need to have some utility that reads data from the database from you. So that's what this is about. And it completely faked it, okay? It just returned true if this SQ is for tissue, okay?

So what are our routes? We have two routes. One is the product. So we want a route for products, and that returns. And then we also query to get our inventory, okay? And also, we have an inventory which has just returned the number of items that are in store for that SQ. Why we are doing this API structure, who knows, okay? But that's not the point. So, okay, we have this structure. Let's run this and let's see how it goes.

6. Modularizing Routes and Loading

Short description:

We can query the catalog of products and the inventory. Fastify autoload provides a file system-based routing structure. We can refactor our routes folder to become modules and create subfolders for routes within each module. The key interaction point between the catalog and inventory is the inventory.js file, which belongs to the inventory subsystem. We create an index.js file and load our routes using the autoload utility.

So we do Node server, and then we could do... let's do that, okay? We can do curl. And we can go and query for the catalog of the products, okay? And you can see the result. And then you can go inventory, and product 42, and you get the data. And then if it's 43, you don't get anything, okay? Note that you see that there is a prefix, and the prefix is the folder. So Fastify autoload really gives you that nice Fastify file system-based routing to structure your thing.

So this structure is pretty good, okay? This is a good monolith, essentially, what you would call MVC architecture, very close. But it's something that can take you very far. How do we migrate this to be a modular monolith? And how can we have multiple teams communicating with each other, and sharing code in a better way? Okay, let's start with doing a little bit of refactoring to this.

So first of all, let's take our magical routes folder, and let's call it modules, because we like it, right? So it's not route, it's modules. So, and now we are becoming a modular architecture, right? That's how you do it, okay? So, and you have still have your catalog and your inventory, but now we create sub folders for routes, and you move the stuff in there. Okay, and then inventory. And you move the other routes. Cool, we have, maybe I've made my move at this stuff, and why do we do this? Well, it will be clear in a second. So we have done this, these two migration, okay? How do we separate them? So the key interaction point between the catalog and the inventory is this inventory.js file, which is a plugin. So we need to do something about it because this truly, it belongs to the inventory subsystem. So what we do is we open it up and we create, here we create an index.js file. And in this file, literally, I'm just cheating badly. I'm just putting stuff in here, okay, copying these up. Well, we won't need this anymore. I'll show you in a second why. So we have this and great. Now we need a few more things. So we want to load our routes. So we go and copy these two things. We get the autoload and this utility called DSM that I wrote. Don't ask why because it's a bad answer. So it's you don't want to join routes. So here you take you got that and oh you just copy this one. Okay, so here you go into inventory and after you do that you have set up the autoload thing and to load our routes.

7. Refactoring and Improvements with Platformattic

Short description:

We have refactored everything and now we can restart this app. It's crashing, but we fix it. Now we can query it and see that it still works the same as before. Can we do something better? Yes, we can. We have been working on a new company called Platformattic. We can create a new Platformattic.service.json config file and open up a server.

Okay, so this is done. Okay, now what we need to do is we need to essentially do the same thing for our catalog. And here we go and we don't need the inventory though. Okay, we will use the inventory of the upper layer. Cool, we need one more thing though. Okay, we want to set the prefix. So we need the options and here we need options and prefix, ops prefix. Cool. Why we'll do that? Because our autoload magic will need, will set up our prefix and we just need to pass that through. So we do that and we have, what is it? Okay, great! So we have created, we have set up our stuff. Now here we can delete this inventory file. And in here, oh, well we don't need, this is not routes anymore. It's modules but we just need to change something. We don't want to, we want to break encapsulation. And we just want to load things at one level. So we have refactored everything. And now we can restart this app and it's crashing. Good! And here you go and it's up instead of fastify. Great! Okay, and it again is the same thing on the other file. Look here, I'm just changing this fastify. Cool! So here you go and it's... Come on, I keep forgetting stuff. Okay, here you go. Great! So now we can query it and you can see that this still works the same as it was working before. Okay, and the demo gods have been mostly with me. So let's be very happy about this. So we have been doing this nice refactoring and setting things up and it seems good, right? However, can we do something better? Can we improve our things? Well, we can. I have been for a while working on a new company called Platformattic. Here comes the pitch, so be careful. So what we can do here now is that we can just create a new Platformattic.service.json config file and we could literally open up a server.

8. Configuring Fastify and Launching the Cloud

Short description:

Let's see if Copilot is happy enough. We add the server property, plugins, and modules. We delete unnecessary files. The app restarts automatically. OpenAPI docs are generated. PlatformaticDB generates APIs from a database. Building a modular monolith is about creating and separating concerns. You can easily migrate to microservices. We launched our free cloud for deploying Fastify or Node.js applications.

Let's see if Copilot is happy enough. So, schemas, well, yeah, not exactly what it should be. Schemas, and here we have V20 and here we go. And this is DB, okay, cool. And now it's complaining because we are missing some stuff, so we want to add the server property, and we want to listen to the port, and which go to 1000, we want the hostname, and we want... Okay, cool, we need to add a few more things, so one thing we want to add is plugins, and we want to tell it to load stuff from some path, which is a path, and we need to load plugins first, so we just do load plugins, cool, and we just don't want to encapsulate this, and this is false, cool. Now the next one is we want to load our modules, and we want the modules, we don't want to encapsulate, and we want to just go one one level depth, with one level deep, and now I can just delete this file very happily, delete this other file very happily, so way less files to maintain, and now I can just skill this NPX-PLT service start, and now everything is still working as it was before. So, and now we have simplified a lot of things. Bonus point of this approach is that I could just do, for example, service, add more config, and just turn on OpenAPI. True, okay. And what mistake did I make? Is not allowed... Oh, it's DB. Service. Sure, he's right. Okay, so here it just restarts. Okay, it was restarted automatically. Cool stuff. So it restarts automatically as you've seen. So what we could do now is go in here and look at lost 3000 documentation and you will see all our OpenAPI docs automatically generated and set up correctly. It also supports automatic metrics, automatic permissions integration and a lot of other things that you want in your production Node.js application. There's another component called PlatformaticDB that automatically generates your APIs from a database, but I'm not talking about this in this presentation. What I wanted to say at the end is, building a modular monolith is all about creating and separating concerns and at some point you might just want to switch to microservices. But if you've done that, you see all the code that I've done is just a config file a way to start with so you could easily migrate to microservices now and you have almost a share-nothing architecture. So I just wanted to say at the end that we also just launched our cloud. So if you want to deploy your Fastify or Node.js application it's out there and it's free. So thank you. Are the startups snapshots taken after function optimization? I don't think this question was for me. Yeah I don't think so. But if you want I can answer that I can try answering that question. I probably have the answer.


Q&A on Dependency Injection and Debugging

Short description:

This is a Q&A section where the speaker answers questions about dependency injection and debugging Fastify microservices. They explain that the shown dependency injection mechanism is a simple way of creating a context and attaching things to it. It is a dry, don't repeat yourself type of system that just works. When it comes to debugging, the speaker advises specifying schemas for both incoming and outgoing data to ensure protection and fast rendering of JSON.

I don't think this is for you. Okay no. Wait. This seems to be something not working. It's something not working with the Q&A. Do you have any questions folks? Yeah just raise your hand and then we just go. Old school. Ooh. Yeah they're just... Okay there is a question over there.

What's your opinion on dependency injection based on ShareCode? ShareCode, Fastify, what are they? Yeah, so what I've just shown is a very simplistic way of dependency injection. Essentially. The question was, what do you think is what you showed. Dependency injection mechanism based on sharing code across Fastify plugin. If I understand the question correctly, right? Perfect. It is exactly that. It's a very crude way of creating a context and attaching things to that context. And to be honest, it is a dependency injection mechanism. It's mostly a very dry, don't repeat yourself type of system. And it's not even config based. You just create your plugins and you can even specify with Fastify autoload, you can even specify a little bit what other values need to be decorated and everything will load correctly. So, yes, it's a very simple dependency injection mechanism. And from my point of view, it's a dependency injection mechanism that just works, essentially.

Okay. Thank you. I have one question here. Oh, it worked! High five! So, how can we debug that our Fastify microservice is working at its best? Yes, this is a phenomenal question. Okay, the first thing that you want to do, you want to create... You want to make sure that you have specified schemas for both the data coming in and the data going out. In that way, you're both protected and you're also rendering your JSON as fast as possible.

Protecting Services and Code Reuse

Short description:

You can use the under-pressure module to protect your service from being overloaded. It ensures that your service returns a nice 503 error when overloaded. The module is part of platformatic and comes with auto-completion support. Platformatics supports full TypeScript compilation, so you can write plugins in TypeScript. When modularizing by domain, you can place code that doesn't fall under a particular domain category in a utility library that can be shared between modules. It's important to keep the domain and database separate to maintain data integrity.

It's great. Then, the second bit is you want to use a module. It's called under-pressure, and under-pressure protects your service from being overloaded. So, you probably have heard about event-loop trashing, and it automatically protects you from that and essentially ensures that if your service receives too much load, it starts returning a nice 503 and, at least, is not crashing or going into a situation that's unrecoverable. Oh, by the way, that module is also part of platformatic, so you get it for free, if you use our stuff. Cool.

And the JSON file was very specific. How would I know what to put there if I am not Matteo? Oh, there is auto-completion if you didn't notice. It's actually very straightforward to put in there, it's JSON schema-based, and the JSON schema provides a guide. Finally, there, yay. That's my next question. It's great, and you can put it there, it's fully documented, but also there is auto-completion. So if there is auto-completion, it's great.

So, do you hate TS? Nope, nope, that's the answer, nope. Nope, I don't. In fact, the platformatics support full TypeScript compilation, so you can just write your plug-ins in TypeScript and everything will work fine as expected. So yes, no, I don't hate TypeScript. What happens to the plug-ins when the application is converted to microservices? Oh, you know, microservices is just a plug-in, right? So, that's what it is.

And when modularizing by domain, where do you place code that doesn't fall under a particular domain category? Some helper to be reused across API endpoints. So, okay, that is two bits. So, when you're building this kind of system, you have two levels of reuse. One level of reuse is typically at the code level. And when working larger teams, especially on a modular monolith, you tend to use a mono-repo. So each one of your modules, as I showed, instead of being structured, instead of just being a single folder, it also has a nice package JSON attached to it, right? So you could very practically have a utility library that you are actually importing and requiring in there. So if you just need code to reuse the utility, you can just, you know, share code. And that's it. If you want to set the key part is keep the domain separate, mostly keep the database separate. Keep the data of each domain contained so that it's not shared between boundaries. Cool. Thoughts on separating the transport HTTP GraphQL PubSub from business logic to allow business logic reuse between them.

Separating Business Logic and API Contracts

Short description:

Separating business logic from transport is challenging in software development. APIs are contracts between developers, enabling communication and access to data and business logic. The API and its interface are crucial for effective collaboration.

OK. I probably I missed a few. Yes, it's like that. OK, so, yes, my point here is it would be nice to do so if you could separate them. And the harsh reality of software development implies that it's actually very hard to actually separate the business logic from the transport. And you can, but it requires a gargantuan effort. So of course, if you are able to, but do it. But at some point, you're moving it from being an HTTP server that expose some API to being a queue exposing some API, OK? And what it's important is not just the code, but also the way the code is invoked. And I tend to put the stress on things on people, not on software. And when you define an API, an API is not code. An API, it's a contract between people. So we, developer of the back end offer you front end developers some access to data and business logic. And the API and the interface of that API is actually the thing that matters the most. Because it's what, it's how we can speak and communicate with a common language.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Node Congress 2022Node Congress 2022
26 min
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Top Content
Do you know what’s really going on in your node_modules folder? Software supply chain attacks have exploded over the past 12 months and they’re only accelerating in 2022 and beyond. We’ll dive into examples of recent supply chain attacks and what concrete steps you can take to protect your team from this emerging threat.
You can check the slides for Feross' talk here.
Node Congress 2022Node Congress 2022
34 min
Out of the Box Node.js Diagnostics
In the early years of Node.js, diagnostics and debugging were considerable pain points. Modern versions of Node have improved considerably in these areas. Features like async stack traces, heap snapshots, and CPU profiling no longer require third party modules or modifications to application source code. This talk explores the various diagnostic features that have recently been built into Node.
You can check the slides for Colin's talk here. 
JSNation 2023JSNation 2023
22 min
ESM Loaders: Enhancing Module Loading in Node.js
Native ESM support for Node.js was a chance for the Node.js project to release official support for enhancing the module loading experience, to enable use cases such as on the fly transpilation, module stubbing, support for loading modules from HTTP, and monitoring.
While CommonJS has support for all this, it was never officially supported and was done by hacking into the Node.js runtime code. ESM has fixed all this. We will look at the architecture of ESM loading in Node.js, and discuss the loader API that supports enhancing it. We will also look into advanced features such as loader chaining and off thread execution.
JSNation Live 2021JSNation Live 2021
19 min
Multithreaded Logging with Pino
Top Content
Almost every developer thinks that adding one more log line would not decrease the performance of their server... until logging becomes the biggest bottleneck for their systems! We created one of the fastest JSON loggers for Node.js: pino. One of our key decisions was to remove all "transport" to another process (or infrastructure): it reduced both CPU and memory consumption, removing any bottleneck from logging. However, this created friction and lowered the developer experience of using Pino and in-process transports is the most asked feature our user.In the upcoming version 7, we will solve this problem and increase throughput at the same time: we are introducing pino.transport() to start a worker thread that you can use to transfer your logs safely to other destinations, without sacrificing neither performance nor the developer experience.

Workshops on related topic

Node Congress 2023Node Congress 2023
109 min
Node.js Masterclass
Have you ever struggled with designing and structuring your Node.js applications? Building applications that are well organised, testable and extendable is not always easy. It can often turn out to be a lot more complicated than you expect it to be. In this live event Matteo will show you how he builds Node.js applications from scratch. You’ll learn how he approaches application design, and the philosophies that he applies to create modular, maintainable and effective applications.

Level: intermediate
JSNation 2023JSNation 2023
104 min
Build and Deploy a Backend With Fastify & Platformatic
Platformatic allows you to rapidly develop GraphQL and REST APIs with minimal effort. The best part is that it also allows you to unleash the full potential of Node.js and Fastify whenever you need to. You can fully customise a Platformatic application by writing your own additional features and plugins. In the workshop, we’ll cover both our Open Source modules and our Cloud offering:- Platformatic OSS (open-source software) — Tools and libraries for rapidly building robust applications with Node.js ( Platformatic Cloud (currently in beta) — Our hosting platform that includes features such as preview apps, built-in metrics and integration with your Git flow ( 
In this workshop you'll learn how to develop APIs with Fastify and deploy them to the Platformatic Cloud.
Node Congress 2023Node Congress 2023
63 min
0 to Auth in an Hour Using NodeJS SDK
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.JS backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.
Table of contents- A quick intro to core authentication concepts- Coding- Why passwordless matters
Prerequisites- IDE for your choice- Node 18 or higher
JSNation Live 2021JSNation Live 2021
156 min
Building a Hyper Fast Web Server with Deno
Deno 1.9 introduced a new web server API that takes advantage of Hyper, a fast and correct HTTP implementation for Rust. Using this API instead of the std/http implementation increases performance and provides support for HTTP2. In this workshop, learn how to create a web server utilizing Hyper under the hood and boost the performance for your web apps.
React Summit 2022React Summit 2022
164 min
GraphQL - From Zero to Hero in 3 hours
How to build a fullstack GraphQL application (Postgres + NestJs + React) in the shortest time possible.
All beginnings are hard. Even harder than choosing the technology is often developing a suitable architecture. Especially when it comes to GraphQL.
In this workshop, you will get a variety of best practices that you would normally have to work through over a number of projects - all in just three hours.
If you've always wanted to participate in a hackathon to get something up and running in the shortest amount of time - then take an active part in this workshop, and participate in the thought processes of the trainer.
TestJS Summit 2023TestJS Summit 2023
78 min
Mastering Node.js Test Runner
Node.js test runner is modern, fast, and doesn't require additional libraries, but understanding and using it well can be tricky. You will learn how to use Node.js test runner to its full potential. We'll show you how it compares to other tools, how to set it up, and how to run your tests effectively. During the workshop, we'll do exercises to help you get comfortable with filtering, using native assertions, running tests in parallel, using CLI, and more. We'll also talk about working with TypeScript, making custom reports, and code coverage.