Hi everybody !
Today, I’m gonna summarize key aspects of implementing guards with Nest.js and Passport. They will be discussed in Express context because… huh well, I haven’t done any Fastify in a couple of years 😅
Please note that if you want to jump straight up to the code and related integration tests, you can have a look at the related sample repo directly :
This article is an extension of one I previously wrote here, it assumes you already have a good understanding of Nest.js, Passport, Express and Typescript decorators. …
Today here are some thoughts about having a postinstall hook with a dynamic build when adding a library in different contexts.
Imaging you’ve found a nice way to reuse your data validators across both server and client applications.
Ideally, you can reuse your data validators :
That way is easier to maintain if it comes from a single source of truth.
To achieve this part, it’s then required to be able to compile files conditionally to avoid missing or unnecessary files (which bring dependencies alongside).
Hello my fellow confined nerds lol
More seriously I wish you all to be safe and sound 😷
I made a few experiments for a couple of days and I wanted to lay down my thoughts on data manipulation with TypeScript decorators in Nest.js.
Whether writing websites, softwares, apps or anything involving sending data back and forth there’s always this chore to serialize/deserialize from one format to another, whether it be :
Hi everybody, hope you’re safe at home 🏠
Today a quick article about automated data validation with Joi and Nest.js !
This article assumes that you have basic knowledge about :
So typical use case here is to build an automated way to validate the data sent to your API routes.
That’s what Joi already provides as a feature, by allowing you to describe the structure of you data. Other libraries exist too of course like ajv, class-validator, and probably many others.
Hi everybody !
Many questions arose lately when trying to implement reusable pieces for authentication : here are some of the things I’ve learned in the process.
Basically, Nest.js comes packaged with good practices and dependency injections made possible…
Hello everybody !
Today’s article is about mating Terraform and Serverless together to get the best of both worlds.
“Why ?” 🤔 would you ask me !
Because IMHO, Terraform is very good at handling the infrastructure part while Serverless makes it a breeze to manage your Cloud FaaS deployments.
When I say “very good” it mostly means “less verbose”, as both of them are able to perform the same exact tasks on their own.
Imagine you would like to describe your core infrastructure with Terraform on AWS, so for example :
Article of today is about dynamically matching files for your tests run with Jest.
Let’s say you have 2 different kinds of tests in your application :
*.test.jswhich probably require to setup some kind of environment (database, API server, and so on) and tend to run for quite a while
Now let’s imagine you would like to setup your code versioning workflow on GitHub (or another provider) this way :
master: main repository branch where you would like to run only Continuous Delivery pipeline
Recently I had to play around with small scripts in Python, while I’m more commonly using Node.js, then rose a question in my mind : “is it possible to have Python script executes Node.js script, and the other way around too ?”.
I googled it and found a few ways !
Hi everybody ! 😃
A while ago I updated my mesg-pusher repository I started months ago to the latest version of MESG Engine. This also was the opportunity to experiment with the new Github Actions ! Having run into a few issues to get things working, I thought I would share with you all the steps to test a MESG Service.
MESG aims at creating decentralized event-driven task-orchestration systems. Anybody can implement various kind of MESG Services based on either existing ones or entirely new ones.
MESG Application(s) can then consume and orchestrate MESG Services to interact in an event-driven…