<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Softweb</title><link>https://softweb.fr/posts/</link><description>Recent content in Posts on Softweb</description><generator>Hugo</generator><language>fr-fr</language><lastBuildDate>Tue, 07 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://softweb.fr/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Tests E2E en Rust avec Actix-web, SeaORM et Testcontainers</title><link>https://softweb.fr/posts/tests-e2e-rust-actix-seaorm/</link><pubDate>Tue, 07 Apr 2026 00:00:00 +0000</pubDate><guid>https://softweb.fr/posts/tests-e2e-rust-actix-seaorm/</guid><description>&lt;p&gt;Je partage ici un retour d&amp;rsquo;expérience sur la mise en place de tests end-to-end dans une API Rust utilisant l&amp;rsquo;architecture hexagonale. Le stack : Actix-web pour le HTTP, SeaORM comme ORM, et Testcontainers pour avoir un vrai PostgreSQL en test.&lt;/p&gt;
&lt;p&gt;Le chemin n&amp;rsquo;a pas été sans embûches. Entre les problèmes de version PostgreSQL, les pools de connexions qui fuient entre les runtimes Tokio, et les tests concurrents qui polluent la base de données, il y a eu pas mal de pièges à éviter.&lt;/p&gt;</description></item><item><title>Nodejs Module Customization Hooks</title><link>https://softweb.fr/posts/nodejs-module-customization-hooks/</link><pubDate>Thu, 04 Jan 2024 00:00:00 +0000</pubDate><guid>https://softweb.fr/posts/nodejs-module-customization-hooks/</guid><description>&lt;p&gt;Dans ce tutoriel, nous allons explorer comment importer des fichiers non natifs dans Node.js en utilisant les
&lt;a href="https://nodejs.org/docs/latest-v20.x/api/module.html#customization-hooks"&gt;&amp;ldquo;Module Customization Hooks&amp;rdquo;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Je vais prendre comme exemple l&amp;rsquo;importation de fichiers &lt;code&gt;.graphql&lt;/code&gt; dans un projet Node.js compilé avec esbuild.&lt;/p&gt;
&lt;h2 id="mise-en-place-des-fichiers-initiaux"&gt;Mise en place des fichiers initiaux&lt;/h2&gt;
&lt;h3 id="assetsschemagraphql"&gt;&lt;code&gt;assets/schema.graphql&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Exemple de schéma GraphQL :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-graphql" data-lang="graphql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;Description for the type&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;type&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;MyObjectType&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; Description for field
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; Supports **multi-line** description for your [API](http://example.com)!
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; myField: &lt;span style="color:#a6e22e"&gt;String&lt;/span&gt;!
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; otherField(
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;Description for argument&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; arg: &lt;span style="color:#a6e22e"&gt;Int&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; )
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="srcindexjs"&gt;&lt;code&gt;src/index.js&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Tentons d&amp;rsquo;importer directement le fichier &lt;code&gt;.graphql&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>NestJS Request Logger</title><link>https://softweb.fr/posts/nestjs-request-logger/</link><pubDate>Sat, 22 May 2021 00:00:00 +0000</pubDate><guid>https://softweb.fr/posts/nestjs-request-logger/</guid><description>&lt;p&gt;Je partage ici un retour d&amp;rsquo;expérience que j&amp;rsquo;ai fait à mon travail chez &lt;a href="https://www.hikoala.co/"&gt;Koala&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="les-besoins"&gt;Les besoins&lt;/h2&gt;
&lt;p&gt;Je cherche à avoir un HTTP Logger qui trace les HTTP Requests et les HTTP Responses.&lt;/p&gt;
&lt;p&gt;Je veux pouvoir logger aussi bien les requests 404 (aucune route définies) que les requête qui succeed ou même celles qui throw une erreur.&lt;/p&gt;
&lt;h2 id="comment-ça-marche-aujourdhui"&gt;Comment ça marche aujourd&amp;rsquo;hui&lt;/h2&gt;
&lt;p&gt;Aujourd&amp;rsquo;hui on a un &lt;code&gt;LoggerInterceptor&lt;/code&gt; qui intercepte la requête pour les logger, et attend la réponse pour la logger aussi.&lt;/p&gt;</description></item></channel></rss>